prefixmap/prefixmap_error.rs
1use crate::PrefixMap;
2use iri_s::IriSError;
3use serde::Serialize;
4use thiserror::Error;
5
6#[derive(Debug, Error, Clone, Serialize)]
7pub enum PrefixMapError {
8 #[error(transparent)]
9 IriSError(#[from] IriSError),
10
11 #[error("Prefix '{prefix}' not found in PrefixMap '{prefixmap}'")]
12 PrefixNotFound {
13 prefix: String,
14 prefixmap: PrefixMap,
15 },
16
17 #[error("Format error: {error}")]
18 FormatError { error: String },
19}