Skip to main content

error_engine/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum EngineError {
5    #[error("failed to read catalog at {path}: {source}")]
6    CatalogRead {
7        path: String,
8        #[source]
9        source: std::io::Error,
10    },
11    #[error("failed to parse catalog at {path}: {source}")]
12    CatalogParse {
13        path: String,
14        #[source]
15        source: toml::de::Error,
16    },
17}
18
19impl EngineError {
20    /// Single-line summary used to build the UNK-000 fallback message.
21    pub fn summary(&self) -> String {
22        self.to_string()
23    }
24}