Skip to main content

sinkhole_core/errors/
mod.rs

1#[derive(Debug)]
2pub struct StorageError {
3    pub error: String,
4}
5
6impl std::fmt::Display for StorageError {
7    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8        write!(f, "Cause: {}", self.error)
9    }
10}
11
12#[derive(Debug)]
13pub struct QueryError {
14    pub error: String,
15}
16
17impl std::fmt::Display for QueryError {
18    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19        write!(f, "Cause: {}", self.error)
20    }
21}