dotnet_parser/lib.rs
1#![doc = include_str!("../README.md")]
2
3pub mod outdated;
4
5use thiserror::Error;
6
7/// Error type for dotnet_parser
8#[derive(Debug, Error)]
9pub enum Error {
10 /// This means something went wrong when we were parsing the JSON output
11 /// of the program
12 #[error("Error parsing JSON: {0}")]
13 SerdeJsonError(#[from] serde_json::Error),
14 /// This is a wrapped serde_json error which provides a path to the location
15 /// where the error occurred
16 #[error("Error parsing JSON (with path): {0}")]
17 SerdePathError(#[from] serde_path_to_error::Error<serde_json::Error>),
18 /// This means the output of the program contained some string that was not
19 /// valid UTF-8
20 #[error("Error interpreting program output as UTF-8: {0}")]
21 Utf8Error(#[from] std::str::Utf8Error),
22 /// This is likely to be an error when executing the program using std::process
23 #[error("I/O Error: {0}")]
24 StdIoError(#[from] std::io::Error),
25 /// This means that we failed to convert a path into an Utf-8 string
26 #[error("Path conversion error")]
27 PathConversionError,
28}