2025-05-03 18:39:36 +02:00
|
|
|
use crate::{
|
|
|
|
|
command::CommandParseError, meta_commands::MetaCommandParseError,
|
|
|
|
|
statements::StatementParseError,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
pub trait OSDBError {
|
2025-05-03 21:25:19 +02:00
|
|
|
fn display(&self, file: &str);
|
2025-05-03 18:39:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl OSDBError for MetaCommandParseError {
|
2025-05-03 21:25:19 +02:00
|
|
|
fn display(&self, file: &str) {
|
|
|
|
|
println!("{file}: {self}")
|
2025-05-03 18:39:36 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl OSDBError for StatementParseError {
|
2025-05-03 21:25:19 +02:00
|
|
|
fn display(&self, file: &str) {
|
|
|
|
|
println!("{file}: {self}")
|
2025-05-03 18:39:36 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl OSDBError for CommandParseError {
|
2025-05-03 21:25:19 +02:00
|
|
|
fn display(&self, file: &str) {
|
|
|
|
|
println!("{file}: {self}")
|
2025-05-03 18:39:36 +02:00
|
|
|
}
|
|
|
|
|
}
|