use thiserror::Error;
#[derive(Error, Debug)]
pub enum RefpropError {
#[error("REFPROP error {code}: {message}")]
Refprop { code: i32, message: String },
#[error("REFPROP warning {code}: {message}")]
Warning { code: i32, message: String },
#[error("REFPROP library not found: {0}")]
LibraryNotFound(String),
#[error("Fluid file not found: {0}")]
FluidNotFound(String),
#[error("Invalid input: {0}")]
InvalidInput(String),
#[error("Calculation failed: {0}")]
CalculationFailed(String),
}
pub type Result<T> = std::result::Result<T, RefpropError>;