✨ feat(error): introduce custom error enum for cull-gmail
- define `Error` enum to encapsulate errors from google_gmail1 and google_clis_common - use `thiserror` crate for simplified error handling
This commit is contained in:
committed by
Jeremiah Russell
parent
7640485297
commit
cd149b0d53
12
src/error.rs
Normal file
12
src/error.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use thiserror::Error;
|
||||
|
||||
/// Error messages for cull-gmail
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
/// Error from the google_gmail1 crate
|
||||
#[error("Google Gmail1 says: {0}")]
|
||||
GoogleGmail1(#[from] google_gmail1::Error),
|
||||
/// Error from the google_clis_common crate
|
||||
#[error("Google CLIs Common says: {0}")]
|
||||
InvalidOptionsError(google_clis_common::CLIError, i16),
|
||||
}
|
||||
Reference in New Issue
Block a user