New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettyprint for Errors #198
Comments
Thank you for your issue! I agree we should have a good pretty print. I think the ambition should be Rust's error's, it should be immediately obvious, the error should not be noisy. There's likely an error formatting library we can take advantage of. I think part of this should be that we trim the backtrace by default to show like three lines, ideally not from the libraries or rasn, and to have a method for the full backtrace. |
For conditional full backtrace, I was thinking either direct Since the library supports I guess making it as encoder/decoder option is alternative too, maybe later. |
That's a good point about no_std, I think my preference would be a cargo feature rather than cfg, because that's more intuitive to use than cfg variables. I think the "warning" would be included in the backtrace, similar to how |
We might need to format the overall errors.
Should we just convert it pretty-printed
json
(oncejer
is merged), or make custom formatter?It is a bit better now after the
field_error
change, but maybe it could be made cleaner.Here is a decode error for around 7 nested structures...
Might need to think about that backtrace, if we could only show the deepest one.
Expand error
The text was updated successfully, but these errors were encountered: