mc_exam_randomizer/
errors.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ExamReaderError {
5 #[error("Reading error")]
6 IOError(#[from] std::io::Error),
7 #[error("Your input file is badly formatted: `{0}`")]
8 TemplateError(String),
9 #[error("Your input file is badly `{0}` is not available")]
10 Redaction(String),
11 #[error("invalid header (expected {expected:?}, found {found:?})")]
12 InvalidHeader { expected: String, found: String },
13 #[error("unknown error")]
14 Unknown,
15}