19 lines
559 B
Rust
19 lines
559 B
Rust
|
#[derive(Debug, derive_more::Display)]
|
||
|
pub enum Error {
|
||
|
#[display("File not found: {}", 0)]
|
||
|
NotFound(String),
|
||
|
#[display("Unable to parse file contents")]
|
||
|
ParseContent,
|
||
|
#[display("Unable to decode from base64")]
|
||
|
DecodeFromBase64,
|
||
|
#[display("Unable to decoce from UTF-8")]
|
||
|
DecodeFromUtf8,
|
||
|
#[display("Unknown file encoding: {}", 0)]
|
||
|
UnknownEncoding(String),
|
||
|
#[display("Not a file: {}", 0)]
|
||
|
NotFile(String),
|
||
|
#[display("Unknown error (status: {})", 0)]
|
||
|
Unknown(String),
|
||
|
}
|
||
|
impl std::error::Error for Error {}
|