-
Notifications
You must be signed in to change notification settings - Fork 111
Making errors Sync #240
Comments
I believe I'm being hit by a problem of my errors being |
This would be beneficial for those that don't want to lose the type-safety of |
Agreed, wish there was at least an adapter out of the box. I'm having to translate my errors at the moment and it's a hassle :D |
I just run into this too it's quite a bumper and very depressing if it's |
I fully switched to failure as I find it to be a more robust and
cross-cutting approach than error_chain that doesn’t do as much wrapping of
dependency error types but instead promotes that you maintain your own
errors and contexts, particularly when culminating many libs together into
an application and working with all the error types.
On Thu, May 31, 2018 at 8:12 AM Philipp Korber ***@***.***> wrote:
I just run into this too it's quite a bumper and very depressing if it's
in a (opt) dependency and you have to have Sync errors because of
another dependency/software architecture/...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#240 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABPq0PhtK0QZO4NxOKqK3o4vEbsXVnwks5t394ngaJpZM4QXLNc>
.
--
Sent from Gmail Mobile
|
Any news about this? |
The reason is tailhook/quick-error#20 and DrawingAreaErrorKind<E> from plotters. Why not error-chain: rust-lang-deprecated/error-chain#240
Nobody seems to have disagreed with the thrust of this bug, but there are no PR's implementing it either (or at least not tagged appropriately), so its probably in the category of help-wanted. |
Oh huh, there it is. Ta. #241 Now I need to figure out how to get that to happen :P. |
One mildly ugly workaround if anyone else needs it is an adapter like this. Its not as pretty as straight coercion, but it does allow interop for things like anyhow and failure and so-on (more generically than the failure::SyncFailure that inspired it).
|
I created a pull request that adds 'Sync' using a feature flag if anyone wants to check it out |
The failure crate requires that errors are
Sync
. Currently (but not in all previous versions) error-chain makes errors which are!Sync
(because they have aBox<Error + Send>
inside them).It would be beneficial IMO to:
The text was updated successfully, but these errors were encountered: