Skip to content

Instantly share code, notes, and snippets.

@TomerCohen95
Last active October 5, 2023 09:07
Show Gist options
  • Save TomerCohen95/f2c542963d906338c4065d8b0472dfc8 to your computer and use it in GitHub Desktop.
Save TomerCohen95/f2c542963d906338c4065d8b0472dfc8 to your computer and use it in GitHub Desktop.
pub type Result<T, E = TomerCodeError> = anyhow::Result<T, E>;
#[derive(Error, Debug)]
pub enum TomerCodeError {
#[error("Invalid state error: {0}")]
InvalidState(anyhow::Error),
#[error("Connection Error Occoured: {0}")]
ConnectionError(String),
#[error("Logging Error Occoured: {0}")]
LoggingError(#[from] LoggingError),
#[error(transparent)]
Error(#[from] anyhow::Error),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment