cadmpeg_codec_step/
error.rs1use cadmpeg_core::CodecError;
5
6#[derive(Debug, thiserror::Error)]
11pub enum StepError {
12 #[error("STEP target cannot represent the document without loss: {0}")]
14 Unsupported(String),
15 #[error("failed to write STEP output: {0}")]
17 Io(#[from] std::io::Error),
18}
19
20impl From<StepError> for CodecError {
21 fn from(error: StepError) -> Self {
22 match error {
23 StepError::Unsupported(message) => Self::NotImplemented(message),
24 StepError::Io(error) => Self::Io(error),
25 }
26 }
27}