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("unsupported expression node in NL writer: {0}")]
10 UnsupportedNode(&'static str),
11 #[error("variable domain {0} is not representable in NL")]
12 UnsupportedDomain(&'static str),
13 #[error("non-finite numeric value in expression")]
14 InvalidNumber,
15 #[error("binary NL output is not UTF-8, write it to a byte sink with write_nl_with")]
16 BinaryToString,
17 #[error("io: {0}")]
18 Io(#[from] std::io::Error),
19}