1use thiserror::Error;
2
3pub type Result<T, E = SceneGraphError> = core::result::Result<T, E>;
4
5#[derive(Error, Debug)]
6pub enum SceneGraphError {
7 #[error("edge not found")]
8 EdgeNotFound,
9
10 #[error("node not found")]
11 NodeNotFound,
12
13 #[error("point not found")]
14 PointNotFound,
15
16 #[error("layer not found")]
17 LayerNotFound,
18
19 #[error("invalid layers for nesting: cannot nest layer {0} within layer {1}")]
20 InvalidLayersForNesting(u32, u32),
21
22 #[error("feature '{0}' not found")]
23 FeatureNotFound(String),
24
25 #[error("coordinates are required for this layer")]
26 CoordinatesRequired,
27
28 #[error("failed to insert point into the position index: {0}")]
34 PosIndexInsertion(String),
35
36 #[error("observer direction has no viewing axis")]
42 ObserverCreationError,
43
44 #[error("failed to parse scene graph: {0}")]
45 ParseError(String),
46}