Skip to main content

lingora_tui/
error.rs

1use thiserror::Error;
2
3/// Top-level error type used throughout the `lingora-tui` binary.
4#[derive(Debug, Error)]
5pub enum TuiError {
6    /// Any error originating from the core `lingora-common` library.
7    #[error(transparent)]
8    Lingora(#[from] lingora_core::prelude::LingoraError),
9
10    /// Low-level error from the `fluent4rs` parser while reading or parsing `.ftl` files.
11    #[error(transparent)]
12    Fluent4rs(#[from] fluent4rs::prelude::Fluent4rsError),
13
14    /// I/O error during terminal operations, file reading, or configuration loading.
15    #[error(transparent)]
16    Io(#[from] std::io::Error),
17}