1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum RefpropError {
5 #[error("REFPROP error {code}: {message}")]
7 Refprop { code: i32, message: String },
8
9 #[error("REFPROP warning {code}: {message}")]
12 Warning { code: i32, message: String },
13
14 #[error("REFPROP library not found: {0}")]
16 LibraryNotFound(String),
17
18 #[error("Fluid file not found: {0}")]
20 FluidNotFound(String),
21
22 #[error("Invalid input: {0}")]
24 InvalidInput(String),
25
26 #[error("Calculation failed: {0}")]
28 CalculationFailed(String),
29}
30
31pub type Result<T> = std::result::Result<T, RefpropError>;