xml_3dm/error.rs
1//! Error types for 3DM.
2
3use thiserror::Error;
4
5/// Result type alias for 3DM operations.
6pub type Result<T> = std::result::Result<T, Error>;
7
8/// Errors that can occur during 3DM operations.
9#[derive(Error, Debug)]
10pub enum Error {
11 /// XML parsing error.
12 #[error("XML parse error: {0}")]
13 Parse(String),
14
15 /// Invalid match type value.
16 #[error("Invalid match type: {0}")]
17 InvalidMatchType(u8),
18
19 /// Node operation error.
20 #[error("Node error: {0}")]
21 Node(String),
22
23 /// I/O error.
24 #[error("I/O error: {0}")]
25 Io(#[from] std::io::Error),
26
27 /// XML error from quick-xml.
28 #[error("XML error: {0}")]
29 Xml(#[from] quick_xml::Error),
30}