diff options
author | zaaarf <me@zaaarf.foo> | 2024-02-12 23:26:55 +0100 |
---|---|---|
committer | zaaarf <me@zaaarf.foo> | 2024-02-12 23:26:55 +0100 |
commit | d75ec22464cba08e3cdd5d2bfa6fae3005d2657e (patch) | |
tree | 0b1a83bccf4d26e88a1c79b53725da87b73a1a9a /src/error.rs | |
parent | a1433a32eefc77b5b6722be8cf86ad2ac8406941 (diff) |
chore: improved docs, made api easier
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) } |