pub enum EsFluentError {
Show 14 variants
ConfigNotFound {
path: PathBuf,
},
ConfigParseError(Error),
AssetsNotFound {
path: PathBuf,
},
FallbackLanguageNotFound {
language: String,
},
InvalidLanguageIdentifier {
identifier: String,
reason: String,
},
InvalidFluentIdentifier {
identifier: String,
reason: String,
},
DuplicateGeneratedFtlKey {
key: String,
first: String,
second: String,
},
LanguageNotSupported(LanguageIdentifier),
FluentParseError(Vec<ParserError>),
FluentSerializeError(Error),
IoError(Error),
EnvVarError(VarError),
BackendError(Error),
MissingPackageName,
}Expand description
Common error types shared across the es-fluent ecosystem.
Variants§
ConfigNotFound
Configuration file not found.
ConfigParseError(Error)
Failed to parse configuration file.
AssetsNotFound
Assets directory not found.
FallbackLanguageNotFound
Fallback language directory not found.
InvalidLanguageIdentifier
Invalid language identifier.
InvalidFluentIdentifier
Invalid Fluent metadata identifier.
DuplicateGeneratedFtlKey
Duplicate generated Fluent key metadata.
LanguageNotSupported(LanguageIdentifier)
Language not supported.
FluentParseError(Vec<ParserError>)
Fluent parsing error.
FluentSerializeError(Error)
Fluent serialization error.
IoError(Error)
IO error during file operations.
EnvVarError(VarError)
Environment variable error.
BackendError(Error)
Generic backend error.
MissingPackageName
Missing package name.
Implementations§
Source§impl EsFluentError
impl EsFluentError
Sourcepub fn config_not_found(path: impl Into<PathBuf>) -> Self
pub fn config_not_found(path: impl Into<PathBuf>) -> Self
Creates a configuration not found error.
Sourcepub fn assets_not_found(path: impl Into<PathBuf>) -> Self
pub fn assets_not_found(path: impl Into<PathBuf>) -> Self
Creates an assets not found error.
Sourcepub fn invalid_language_identifier(
identifier: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_language_identifier( identifier: impl Into<String>, reason: impl Into<String>, ) -> Self
Creates an invalid language identifier error.
Sourcepub fn invalid_fluent_identifier(
identifier: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_fluent_identifier( identifier: impl Into<String>, reason: impl Into<String>, ) -> Self
Creates an invalid Fluent metadata identifier error.
Sourcepub fn duplicate_generated_ftl_key(
key: impl Into<String>,
first: impl Into<String>,
second: impl Into<String>,
) -> Self
pub fn duplicate_generated_ftl_key( key: impl Into<String>, first: impl Into<String>, second: impl Into<String>, ) -> Self
Creates a duplicate generated FTL key error.
Sourcepub fn fallback_language_not_found(language: impl Into<String>) -> Self
pub fn fallback_language_not_found(language: impl Into<String>) -> Self
Creates a fallback language not found error.
Trait Implementations§
Source§impl Debug for EsFluentError
impl Debug for EsFluentError
Source§impl Display for EsFluentError
impl Display for EsFluentError
Source§impl Error for EsFluentError
impl Error for EsFluentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()