tree_painter/
error.rs

1/// Errors occuring during parsing of themes and rendering.
2#[derive(thiserror::Error, Debug)]
3pub enum Error {
4    /// Helix theme could not be parsed as valid TOML
5    #[error("toml parse eror: {0}")]
6    Toml(#[from] toml::de::Error),
7    /// TOML data is not structured like a valid Helix theme.
8    #[error("toml does not contain valid helix theme")]
9    InvalidTheme,
10    /// A color is referenced but is not defined.
11    #[error("toml color {0} not found")]
12    InvalidColorReference(String),
13    /// Failed to highlight source.
14    #[error("highlighting failed: {0}")]
15    Highlighting(#[from] tree_sitter_highlight::Error),
16}