More concise/consistent error messages
This commit is contained in:
parent
978e43a4c1
commit
3d0c3166f3
|
@ -23,11 +23,12 @@ impl StdError for Error {}
|
||||||
impl Display for Error {
|
impl Display for Error {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
|
Error::Io(e) => write!(f, "I/O error: {}", e),
|
||||||
Error::Command(e) => {
|
Error::Command(e) => {
|
||||||
write!(f, "epp-client EppCommandError: {}", e.result.message)
|
write!(f, "command error: {}", e.result.message)
|
||||||
}
|
}
|
||||||
Error::Other(e) => write!(f, "epp-client Exception: {}", e),
|
Error::Xml(e) => write!(f, "(de)serialization error: {}", e),
|
||||||
_ => write!(f, "epp-client Exception: {:?}", self),
|
Error::Other(e) => write!(f, "error: {}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue