use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Error)]
pub enum PhysicsError {
#[error("Invalid parameter '{param}': {reason}")]
InvalidParameter {
param: &'static str,
reason: String,
},
#[error("Quantum number out of range: {0}")]
QuantumNumberOutOfRange(String),
#[error("Velocity {velocity:.6e} m/s is >= speed of light {c:.6e} m/s")]
SuperluminalVelocity {
velocity: f64,
c: f64,
},
#[error("Domain error: {0}")]
DomainError(String),
}
pub type PhysicsResult<T> = Result<T, PhysicsError>;