meshdb_core/error.rs
1use crate::{EdgeId, NodeId};
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum Error {
6 #[error("invalid property type: expected {expected}, got {actual}")]
7 InvalidPropertyType {
8 expected: &'static str,
9 actual: &'static str,
10 },
11
12 #[error("node not found: {0}")]
13 NodeNotFound(NodeId),
14
15 #[error("edge not found: {0}")]
16 EdgeNotFound(EdgeId),
17}
18
19pub type Result<T> = std::result::Result<T, Error>;