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

[Error handling 1/N] Drop snafu magic and use explicit thiserror #235

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jieyouxu
Copy link
Collaborator

@jieyouxu jieyouxu commented Aug 8, 2024

This is the first PR in a series of patches intended to simplify and improve our error handling.

Using thiserror does not make error handling simpler, but it allows we to drop snafu because snafu has a bunch of magic proc macros that makes it non-obvious when reading the code. thiserror error types are compatible with eyre in that they can be used as "leaf" error types in an error trace.

Rebased on top of #232.

- Rename "Install mods" -> "Apply changes" to be less confusing.
- Rename "Uninstall mods" -> "Uninstall hook and mods".
- Added hover text for both buttons to help explain what they do.
For now, drop snafu due to proc-macro magic that makes error handling in
code non-obvious. This is a first step towards transitioning to anyhow
or another application-based error handling strategy.
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.

1 participant