Replies: 1 comment
-
|
Integration with eros may be what you are looking for. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to be able to attach arbitrarily many context layers (strings) to an error like with
anyhow. Then, the whole chain of errors can be displayed, making it easier to interpret the error, like so: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=e9f0165235983d8021bebf3081d9bd99I think what
error_setdoes withwarn_context()etc. is not really comparable but something different, because the context is not stored inside of the error but immediately passed to a logging crate. For instance, if I'd like to display an error chain in a UI, not on the console, I'd need to set up a complicated tracing subscriber to extract exactly the right messages for that error - I'm not sure that is even possible.Is this something that is worth considering? I'm guessing it would require adding an extra "Chained" variant to error enums that stores the original error and a context message.
Beta Was this translation helpful? Give feedback.
All reactions