epcis_models/error.rs
1//! Error types for the EPCIS models crate.
2
3use thiserror::Error;
4
5/// Enumeration of all error types in the EPCIS model crate.
6#[derive(Debug, Error, Clone, PartialEq, Eq)]
7#[non_exhaustive]
8pub enum EpcisModelError {
9 /// Invalid Electronic Product Code (EPC) URN or Digital Link.
10 #[error("invalid EPC: {0}")]
11 InvalidEpc(String),
12
13 /// Invalid GS1 URI.
14 #[error("invalid URI: {0}")]
15 InvalidUri(String),
16}