es_fluent_generate/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum FluentGenerateError {
5    /// An IO error.
6    #[error("IO error: {0}")]
7    Io(#[from] std::io::Error),
8
9    /// An environment variable error.
10    #[error("Environment variable error: {0}")]
11    EnvVar(#[from] std::env::VarError),
12
13    /// An error that occurs when the package name is missing.
14    #[error("Missing package name")]
15    MissingPackageName,
16
17    /// An error that occurs when parsing a Fluent file.
18    #[error("Fluent parsing error: {0:?}")]
19    ParseError(Vec<fluent_syntax::parser::ParserError>),
20
21    /// An error that occurs when serializing a Fluent file.
22    #[error("Fluent serialization error: {0}")]
23    SerializeError(#[from] std::fmt::Error),
24}