-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a single
Error
type to catch all errors
- Loading branch information
Showing
9 changed files
with
195 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! TODO | ||
use thiserror::Error; | ||
|
||
/// Catch-all error for this crate. | ||
#[derive(Debug, Error)] | ||
pub enum Error { | ||
/// An error that originates in this crate. | ||
#[error("{0}")] | ||
General(String), | ||
/// Error that does not originate from this crate. | ||
#[error(transparent)] | ||
Other(#[from] anyhow::Error), | ||
} | ||
|
||
/// TODO | ||
pub type Result<T> = std::result::Result<T, Error>; |
Oops, something went wrong.