🐛 fix(error): refine error handling with granular variants
- introduce specific error variants for std::io::Error and toml::de::Error - remove commented-out error variants to streamline error reporting
This commit is contained in:
committed by
Jeremiah Russell
parent
1bbc75206a
commit
c4e4e28f66
13
src/error.rs
13
src/error.rs
@@ -16,13 +16,12 @@ pub enum Error {
|
|||||||
#[error("Directory creation failed for `{0:?}`")]
|
#[error("Directory creation failed for `{0:?}`")]
|
||||||
DirectoryCreationFailed((String, Box<std::io::Error>)),
|
DirectoryCreationFailed((String, Box<std::io::Error>)),
|
||||||
/// Error from the google_gmail1 crate
|
/// Error from the google_gmail1 crate
|
||||||
// #[error("Google Gmail1 says: {0}")]
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
GoogleGmail1(#[from] Box<google_gmail1::Error>),
|
GoogleGmail1(#[from] Box<google_gmail1::Error>),
|
||||||
// /// Error from the google_clis_common crate
|
/// Error from std::io
|
||||||
// #[error("Google CLIs Common says: {0}")]
|
#[error(transparent)]
|
||||||
// InvalidOptionsError(google_clis_common::CLIError, i16),
|
StdIO(#[from] std::io::Error),
|
||||||
// /// Other error
|
/// Error from toml_de
|
||||||
// #[error("Error reported: {0}")]
|
#[error(transparent)]
|
||||||
// Other(#[from] String),
|
TomlDe(#[from] toml::de::Error),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user