use thiserror::Error;
#[derive(Error, Debug)]
pub enum GivError {
#[cfg(feature = "pi")]
#[error(
"Requested number of PI decimal places '{0}' is not supported please select a value between '1' and '{1}'"
)]
DecimalPlacesOutOfRange(usize, usize),
#[cfg(feature = "pi")]
#[error("Conflicting flags: {0}")]
ConflictingFlags(String),
#[cfg(feature = "rng")]
#[error(
"Invalid RNG specification: '{0}'. Expected formats: 'XdY' or 'dY' for dice, 'X..Y' for ranges"
)]
InvalidRngSpec(String),
#[cfg(feature = "rng")]
#[error("Numeric overflow or underflow in calculation: {0}")]
NumericOverflow(String),
#[cfg(feature = "bytes")]
#[error(
"Raw bytes encoding is not supported in JSON output mode. Use --encoding=hex or --encoding=base64 instead"
)]
RawBytesNotSupportedInJson,
#[cfg(feature = "chars")]
#[error("Unknown character pattern or emoji shortcode: '{0}'")]
UnknownCharacterPattern(String),
#[error("Required arguments not provided. Use '{0}' for usage information")]
RequiredArgumentsNotProvided(String),
}