scone_core/error.rs
1/// Errors surfaced by the Scone engine.
2///
3/// Failures are values, never deletions or silent fallbacks
4/// (memory/bugs.md P-2).
5#[derive(thiserror::Error, Debug)]
6pub enum SconeError {
7 #[error("io: {0}")]
8 Io(#[from] std::io::Error),
9 #[error("db: {0}")]
10 Db(#[from] rusqlite::Error),
11 #[error("index: {0}")]
12 Index(String),
13 #[error("embed: {0}")]
14 Embed(String),
15 #[error("llm: {0}")]
16 Llm(String),
17 #[error("invalid input: {0}")]
18 InvalidInput(String),
19 #[error("not found: {0}")]
20 NotFound(String),
21}
22
23pub type Result<T> = std::result::Result<T, SconeError>;