Skip to main content

paft_core/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error, Clone, PartialEq, Eq)]
4#[non_exhaustive]
5/// Domain-oriented errors shared across the paft workspace.
6pub enum PaftError {
7    /// Invalid value provided for an enum parser.
8    #[error("Invalid {enum_name} value: '{value}'")]
9    InvalidEnumValue {
10        /// Enum type name for context (e.g., "Currency").
11        enum_name: &'static str,
12        /// The offending input value.
13        value: String,
14    },
15}