use thiserror::Error;
#[derive(Debug, Error)]
pub enum ArgminError {
#[error("Invalid parameter: {text:?}")]
InvalidParameter {
text: String,
},
#[error("Not implemented: {text:?}")]
NotImplemented {
text: String,
},
#[error("Not initialized: {text:?}")]
NotInitialized {
text: String,
},
#[error("Condition violated: {text:?}")]
ConditionViolated {
text: String,
},
#[error("Checkpoint not found: {text:?}")]
CheckpointNotFound {
text: String,
},
#[error("Impossible Error: {text:?}")]
ImpossibleError {
text: String,
},
}
#[cfg(test)]
mod tests {
use super::*;
send_sync_test!(error, ArgminError);
}