mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 17:45:35 +00:00
dump unsupported mime type string
This commit is contained in:
parent
76235da239
commit
2c88f12f2d
2 changed files with 22 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ use std::fmt::{Display, Formatter, Result};
|
|||
pub enum Error {
|
||||
Decode(std::string::FromUtf8Error),
|
||||
Protocol,
|
||||
Undefined,
|
||||
Undefined(Option<String>),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
|
|
@ -16,8 +16,15 @@ impl Display for Error {
|
|||
Self::Protocol => {
|
||||
write!(f, "Protocol error")
|
||||
}
|
||||
Self::Undefined => {
|
||||
write!(f, "Undefined")
|
||||
Self::Undefined(e) => {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
match e {
|
||||
Some(value) => format!("`{value}` undefined"),
|
||||
None => "Could not parse value".to_string(),
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue