1use thiserror::Error;
8
9#[derive(Debug, Error)]
10pub enum Error {
11 #[error("IO error: {0}")]
12 Io(#[from] std::io::Error),
13
14 #[error("Invalid format: {message}")]
15 InvalidFormat { message: String },
16
17 #[error("Unsupported {format} version {found}; supported {min_supported}..={current}")]
18 UnsupportedVersion {
19 format: String,
20 found: u8,
21 min_supported: u8,
22 current: u8,
23 },
24
25 #[error("Missing glyph '{0}'")]
26 MissingGlyph(char),
27
28 #[error("Invalid color: {0}")]
29 InvalidColor(String),
30}
31
32