mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
error: Use better error messages.
This commit is contained in:
parent
ff77f6141f
commit
79804e2b01
1 changed files with 8 additions and 8 deletions
|
@ -48,14 +48,14 @@ pub enum Error {
|
|||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Error::ParseError(s) => write!(fmt, "{}", s),
|
||||
Error::Base64Error(ref e) => write!(fmt, "{}", e),
|
||||
Error::ParseIntError(ref e) => write!(fmt, "{}", e),
|
||||
Error::ParseStringError(ref e) => write!(fmt, "{}", e),
|
||||
Error::ParseAddrError(ref e) => write!(fmt, "{}", e),
|
||||
Error::JidParseError(_) => write!(fmt, "JID parse error"),
|
||||
Error::ChronoParseError(ref e) => write!(fmt, "{}", e),
|
||||
match self {
|
||||
Error::ParseError(s) => write!(fmt, "parse error: {}", s),
|
||||
Error::Base64Error(e) => write!(fmt, "base64 error: {}", e),
|
||||
Error::ParseIntError(e) => write!(fmt, "integer parsing error: {}", e),
|
||||
Error::ParseStringError(e) => write!(fmt, "string parsing error: {}", e),
|
||||
Error::ParseAddrError(e) => write!(fmt, "IP address parsing error: {}", e),
|
||||
Error::JidParseError(e) => write!(fmt, "JID parsing error: {}", e),
|
||||
Error::ChronoParseError(e) => write!(fmt, "time parsing error: {}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue