Conversation
|
|
||
| No effort is made to bridge the JS and C++ worlds in terms of catching | ||
| exceptions from the other side and automatically converting them. That is, you | ||
| cannot expect a C++ try-catch to catch a JS exception. C++ can only catch C++ |
Contributor
There was a problem hiding this comment.
Correct me if I'm wrong but I believe there are two big points to make here:
- C++ can't catch JS exceptions
- The C++ stack is not unwound correctly if a JS exception bubbles up through it. Destructors are not called
I'd argue that the second one is the really scary one and we should make it super clear to anyone using emscripten EH
aheejin
reviewed
Mar 1, 2022
Comment on lines
+89
to
+91
| The reason for this is that handling and converting expections by Emscripten | ||
| would add significant overhead. If you need such functionality you can add it | ||
| at the JS/Wasm layer. |
Member
There was a problem hiding this comment.
I think the reason is not overhead but that I just didn't have time to do it yet... I think it's OK to say that it is not yet supported but I'm not sure if we want to make it sound like it's a inherent restriction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The limitations here came up in discussion with @bkotsopoulossc
Does these docs look helpful?