1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum IoError {
5 #[error("model has no objective")]
6 NoObjective,
7 #[error("nonlinear nodes are not representable in this format")]
8 Nonlinear,
9 #[error("second-order cone constraints cannot be represented in this format")]
10 Conic,
11 #[error("unsupported expression node in NL writer: {0}")]
12 UnsupportedNode(&'static str),
13 #[error("variable domain {0} is not representable in NL")]
14 UnsupportedDomain(&'static str),
15 #[error("non-finite numeric value in expression")]
16 InvalidNumber,
17 #[error("binary NL output is not UTF-8, write it to a byte sink with write_nl_with")]
18 BinaryToString,
19 #[error("io: {0}")]
20 Io(#[from] std::io::Error),
21}