Add fancy errors#143
Conversation
Adds colored errors via color_eyre as a unified way to show the errors. This also adds the thiserror crate to easily implement the default std::display trait.
|
Hmm, I never claimed to make this tool a library, and reluctantly made some of this available to be used as such. I wonder if this breaks anything for those users. |
|
Technically yes. This changes the return types of some of the public functions from The return types are mostly changed so you can get a better stack trace and suggestions in a reasonable place, however you can easily just revert the return types since the You could consider this a breaking change and then update the major version or change the return types back. |
|
I'll need to think on this for a bit. I'll be honest, I wrote this a long time ago and I haven't kept up with the zeitgeist for error crate stuff. Even this project doesn't seem to build correctly at the moment in some PRs. |
Fixes #142, maybe #124?
Adds colored errors, mostly to clean up how the offline error is displayed. These do not apply to Clap errors.
Since this adds color_eyre and errors are always returned, the new error parsing may be able to replace the entire error module. I have decided not to do that to make fewer changes for this pull request.
This adds
color_eyreandthiserror.Before:
After: