[Help Needed] Implement error handling #2463
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this about
This PR is trying to support error handling within wasm-bindgen.
This is especially needed if a library is created with wasm-bindgen, which is then used in the browser as well as in a rust executable.
Related Issues & PRs
Following issues are related to this PR:
JsError
type #1017There was already the PR #1173 which has addressed this issue.
At that time the PR has been closed, because
failure::Error
doesn't implementstd::error::Error
.This problem should not exist anymore, because
failure::Error
is deprecated.Support needed
I took the original implementation from #1173 and created this PR for it. @RReverser, I hope this is okay for you.
Unfortunately I don't understand wasm-bindgen enough to correctly handle the
__wbindgen_error_new
adapter.This part of the source code has changed so much, that I need support to finish this implementation.