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

Use source attribute in errors #1265

Closed
1 task
jpraynaud opened this issue Sep 27, 2023 · 0 comments · Fixed by #1268
Closed
1 task

Use source attribute in errors #1265

jpraynaud opened this issue Sep 27, 2023 · 0 comments · Fixed by #1268
Assignees
Labels
refactoring 🛠️ Code refactoring and enhancements

Comments

@jpraynaud
Copy link
Member

Why

We want to enhance the visibility of the stack trace displayed with errors.

What

We need to use the source attribute in the errors defined with thiserror.

Here is a Rust playground that summarize the usage of source attribute:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bf667c443696beb90106f6ae627a57b9

How

  • Convert all the enum variants embedding StdError to use the source attribute.
@jpraynaud jpraynaud added the refactoring 🛠️ Code refactoring and enhancements label Sep 27, 2023
@jpraynaud jpraynaud mentioned this issue Sep 27, 2023
91 tasks
@Alenar Alenar self-assigned this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring 🛠️ Code refactoring and enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants