Skip to main content

nereids_core/
error.rs

1//! Error types for the NEREIDS library.
2
3/// Top-level error type for all NEREIDS operations.
4#[derive(Debug, thiserror::Error)]
5pub enum NereidsError {
6    #[error("ENDF error: {0}")]
7    Endf(String),
8
9    #[error("Physics error: {0}")]
10    Physics(String),
11
12    #[error("I/O error: {0}")]
13    Io(#[from] std::io::Error),
14
15    #[error("Fitting error: {0}")]
16    Fitting(String),
17
18    #[error("Invalid parameter: {0}")]
19    InvalidParameter(String),
20}
21
22/// Convenience type alias for NEREIDS results.
23pub type NereidsResult<T> = Result<T, NereidsError>;