shapes_converter/shex_to_uml/
uml_error.rs1use std::io;
2
3use super::NodeId;
4use thiserror::Error;
5
6#[derive(Error, Debug)]
7pub enum UmlError {
8 #[error("NodeId has already a component")]
9 NodeIdHasComponent { node_id: NodeId },
10
11 #[error(transparent)]
12 IOError {
13 #[from]
14 err: io::Error,
15 },
16 #[error("UmlError: Feature not implemented: {msg}")]
17 NotImplemented { msg: String },
18}
19
20impl UmlError {
21 pub fn not_implemented(msg: &str) -> UmlError {
22 UmlError::NotImplemented {
23 msg: msg.to_string(),
24 }
25 }
26}