nova_boot_graphdb/
error.rs1use std::fmt;
2
3#[derive(Debug)]
5pub enum GraphDbError {
6 Backend(String),
8 NotImplemented(&'static str),
10 InvalidInput(String),
12 Serialization(String),
14}
15
16impl fmt::Display for GraphDbError {
17 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18 match self {
19 Self::Backend(msg) => write!(f, "backend error: {msg}"),
20 Self::NotImplemented(msg) => write!(f, "not implemented: {msg}"),
21 Self::InvalidInput(msg) => write!(f, "invalid input: {msg}"),
22 Self::Serialization(msg) => write!(f, "serialization error: {msg}"),
23 }
24 }
25}
26
27impl std::error::Error for GraphDbError {}