#[derive(Debug, Clone, Copy, PartialEq)]
pub enum SolverError
{
Unbounded,
Infeasible,
ExcessIter,
InvalidOp,
WorkShortage,
ConeFailure,
}
impl core::fmt::Display for SolverError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", match &self {
SolverError::Unbounded => "Unbounded: found an unbounded certificate",
SolverError::Infeasible => "Infeasible: found an infeasibile certificate",
SolverError::ExcessIter => "ExcessIter: exceed max iterations",
SolverError::InvalidOp => "InvalidOp: invalid Operator",
SolverError::WorkShortage => "WorkShortage: shortage of work slice length",
SolverError::ConeFailure => "ConeFailure: failure caused by Cone",
})
}
}
#[cfg(feature = "std")]
extern crate std;
#[cfg(feature = "std")]
impl std::error::Error for SolverError {}