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

Refactor errors (breaking) #33

Merged
merged 10 commits into from
Sep 28, 2021
Merged

Refactor errors (breaking) #33

merged 10 commits into from
Sep 28, 2021

Conversation

arctic-hen7
Copy link
Member

This refactors errors to use thiserror and fmterr instead of error_chain, and additionally improves render functions to work with any error messages, making ? possible in them. This includes breaking changes, and will be released in v0.3.0.

Closes #31.

Was `FetchError`, should be `ClientError`.
We don't need `anyhow` anymore.
Before, only `String` was allowed as an error type.
This also makes `?` usable.

BREAKING CHANGE: `StringResult`/`StringResultWithCause` are replaced by `RenderFnResult`/`RenderFnResultWithCause`
We're now using JS raw strings, escaping as necessary, and then escaping control characters in the shell.
@arctic-hen7 arctic-hen7 added this to the v0.3.0 milestone Sep 28, 2021
@arctic-hen7 arctic-hen7 self-assigned this Sep 28, 2021
@arctic-hen7 arctic-hen7 merged commit 53bb61e into main Sep 28, 2021
@arctic-hen7 arctic-hen7 deleted the refactor-errors branch September 28, 2021 20:38
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.

Make render functions work with any error
1 participant