mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
18 lines
434 B
Rust
18 lines
434 B
Rust
#[derive(Debug)]
|
|
pub enum Error {
|
|
Database(sqlite::Error),
|
|
Gemini(super::gemini::Error),
|
|
}
|
|
|
|
impl Error {
|
|
pub fn to_string(&self) -> String {
|
|
match self {
|
|
Self::Database(reason) => {
|
|
format!("Database error: {}", reason)
|
|
}
|
|
Self::Gemini(reason) => {
|
|
format!("Could not init Gemini identity: {}", reason.to_string())
|
|
}
|
|
}
|
|
}
|
|
}
|