use thiserror::Error;
#[derive(Error, Debug, PartialEq, Eq, Clone, Hash)]
pub enum DataError {
#[error("no chip-family database matches chip '{0}'")]
UnknownChip(String),
#[error("no device-tree source matches '{0}'")]
UnknownDts(String),
#[error("failed to parse chip database for '{0}': {1}")]
DatabaseParse(String, String),
#[error("no peripheral/interrupt map is bundled for chip '{chip}' core '{core}'")]
ChipMapUnavailable { chip: String, core: String },
#[error("failed to parse the peripheral map for chip '{chip}' core '{core}': {detail}")]
ChipMapParse {
chip: String,
core: String,
detail: String,
},
}