You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thank you very much for your work on this crate. I've had a lot of fun maintaining my IRC bot written against this library for over a year now.
I'm a little confused about how I can produce meaningful user-facing error messages with 0.15.0. Unfortunately the examples don't seem to shed any light on this.
My application performs reconnect attempts in a loop and reports errors by log, so I'd like to catch any type of error in that loop, report it to the user, and proceed to reconnect. I'm able to obtain an irc::error::Error from the failure::Errors falling out of client.identify(), stream.next() and so on, but simply .to_string()'ing or printing these errors produces very vague results. For example:
an io error occurred
Debug-formatting produces more useful but less user-friendly output:
Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" })
I've taken a look at error.rs. Is my application supposed to match and implement specific behavior for every error type, or is the vagueness of these error messages unintended?
I'd appreciate any pointers.
The text was updated successfully, but these errors were encountered:
First off, thank you very much for your work on this crate. I've had a lot of fun maintaining my IRC bot written against this library for over a year now.
I'm a little confused about how I can produce meaningful user-facing error messages with 0.15.0. Unfortunately the examples don't seem to shed any light on this.
My application performs reconnect attempts in a loop and reports errors by log, so I'd like to catch any type of error in that loop, report it to the user, and proceed to reconnect. I'm able to obtain an
irc::error::Error
from thefailure::Error
s falling out ofclient.identify()
,stream.next()
and so on, but simply.to_string()
'ing or printing these errors produces very vague results. For example:Debug-formatting produces more useful but less user-friendly output:
I've taken a look at
error.rs
. Is my application supposed to match and implement specific behavior for every error type, or is the vagueness of these error messages unintended?I'd appreciate any pointers.
The text was updated successfully, but these errors were encountered: