mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-23 08:04:52 +01:00
16 lines
369 B
Rust
16 lines
369 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
#[error("SQL error: {0}")]
|
|
SqlError(#[from] rusqlite::Error),
|
|
#[error("JSON error: {0}")]
|
|
JsonError(#[from] serde_json::Error),
|
|
#[error("Model not found {0}")]
|
|
ModelNotFound(String),
|
|
#[error("unknown error")]
|
|
Unknown,
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|