diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index a777a8b..bdbb46d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,10 +7,17 @@ pub type Result<T> = StdResult<T, Error>; /// Simple wrapper around the errors that may occur during the program's execution. #[derive(Debug)] pub enum Error { + /// A generic error - you are not supposed to ever actually encounter this, but it beats + /// using a wild unwrap in a library. GenericError(String), + /// Wraps a [`std::io::Errror`] that occurred while reading the files. IoError(std::io::Error), + /// Wraps a [`unic_langid::LanguageIdentifierError`] that occurred while parsing a language + /// identifier. LanguageIdentifierError(unic_langid::LanguageIdentifierError), + /// Wraps any number of [`fluent::FluentError`] that have occurred while parsing. FluentError(Vec<fluent::FluentError>), + /// Happens when you try to get a message that does not actually exist. MissingMessageError(String) } |