dpp_domain/catalog/error.rs
1//! [`CatalogError`] — errors from runtime catalog registration.
2
3/// Errors from runtime catalog registration.
4#[derive(Debug, Clone, PartialEq, Eq)]
5#[non_exhaustive]
6pub enum CatalogError {
7 /// A descriptor for this key already exists.
8 AlreadyExists(String),
9}
10
11impl std::fmt::Display for CatalogError {
12 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13 match self {
14 Self::AlreadyExists(key) => write!(f, "sector '{key}' already in catalog"),
15 }
16 }
17}
18
19impl std::error::Error for CatalogError {}