🐛 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:
Jeremiah Russell
2025-10-07 15:51:15 +01:00
committed by Jeremiah Russell
parent 1bbc75206a
commit c4e4e28f66

View File

@@ -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),
} }