Skip to content
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

Log general anyhow errors better #76

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Log general anyhow errors better #76

merged 1 commit into from
Oct 26, 2023

Conversation

SomeoneToIgnore
Copy link
Contributor

See https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations

Use {e:#} instead of {e} in global error printers to print the entire chain of anyhow contexts that lead to error.
Previous version printed the topmost context only, making it hard to debug errors.

We could also use {e:?} to print any backtraces associated, but that seems like an overkill since will produce vast logs in the playdate console.

@boozook boozook merged commit c944ce6 into pd-rs:main Oct 26, 2023
1 check passed
@SomeoneToIgnore SomeoneToIgnore deleted the better-error-logs branch October 27, 2023 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants