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
{{ message }}
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
It'd be convenient if a callback could be registered with color_eyre::config::HookBuilder that gets called with the error passed to the EyreHandler and can add sections to the returned Report.
My use case is annotating 3rd party errors with additional info by downcasting them from the std::error::Error reference. For example, I could create a section with the url, status, and body from a reqwest::Error without having to annotate every single place where the conversion happens.
I could potentially do this by wrapping the color_eyre::config::EyreHook returned by the HookBuilder but it's limited to writing some text before and/or after the call to Handler.debug/display, which isn't pretty.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It'd be convenient if a callback could be registered with
color_eyre::config::HookBuilder
that gets called with the error passed to theEyreHandler
and can add sections to the returnedReport
.My use case is annotating 3rd party errors with additional info by downcasting them from the
std::error::Error
reference. For example, I could create a section with the url, status, and body from areqwest::Error
without having to annotate every single place where the conversion happens.I could potentially do this by wrapping the
color_eyre::config::EyreHook
returned by theHookBuilder
but it's limited to writing some text before and/or after the call toHandler.debug/display
, which isn't pretty.The text was updated successfully, but these errors were encountered: