freya_i18n/
error.rs

1use thiserror::Error;
2
3#[derive(Clone, Debug, Error)]
4pub enum Error {
5    #[error("invalid message id: '{0}'")]
6    InvalidMessageId(String),
7
8    #[error("message id not found for key: '{0}'")]
9    MessageIdNotFound(String),
10
11    #[error("attribute id not found for key: '{0}'")]
12    AttributeIdNotFound(String),
13
14    #[error("message pattern not found for key: '{0}'")]
15    MessagePatternNotFound(String),
16
17    #[error("fluent errors during lookup:\n{0}")]
18    FluentErrorsDetected(String),
19
20    #[error("failed to read locale resource from path: {0}")]
21    LocaleResourcePathReadFailed(String),
22
23    #[error("fallback for \"{0}\" must have locale")]
24    FallbackMustHaveLocale(String),
25
26    #[error("language id cannot be determined - reason: {0}")]
27    InvalidLanguageId(String),
28
29    #[error("invalid path: {0}")]
30    InvalidPath(String),
31}