Skip to main content

meshdb_core/
error.rs

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