use thiserror::Error;
#[derive(Debug, Error)]
pub enum CvxError {
#[error("Problem is not DCP: {0}")]
NotDcp(String),
#[error("Solver error: {0}")]
SolverError(String),
#[error("Shape mismatch: expected {expected}, got {got}")]
ShapeMismatch { expected: String, got: String },
#[error("Invalid problem: {0}")]
InvalidProblem(String),
#[error("Numerical error: {0}")]
NumericalError(String),
}
pub type Result<T> = std::result::Result<T, CvxError>;