error-engine 0.2.0

A message catalog + presentation layer on top of thiserror and tracing for consistent error/warning/info rendering.
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum EngineError {
    #[error("failed to read catalog at {path}: {source}")]
    CatalogRead {
        path: String,
        #[source]
        source: std::io::Error,
    },
    #[error("failed to parse catalog at {path}: {source}")]
    CatalogParse {
        path: String,
        #[source]
        source: toml::de::Error,
    },
}

impl EngineError {
    /// Single-line summary used to build the UNK-000 fallback message.
    pub fn summary(&self) -> String {
        self.to_string()
    }
}