How to extract data from native -fwasm-exceptions
?
#16946
Unanswered
donalffons
asked this question in
Q&A
Replies: 1 comment
-
...forgive me for not researching enough before asking. It seems like this issue is already being adressed in #16380 (and #16033). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Over at OpenCascade.js, we're using Embind and we're having a simple test case that currently tests
-fexceptions
support like this:The line
module.OCJS.getStandard_FailureData(e).GetMessageString()
performs more or less what's suggested in the docs on debugging: In this case its dereferencing and casting the pointer into its native typeStandard_Failure
and then calling theGetMessageString()
method.When using
-fwasm-exceptions
e
is of typeWebAssembly.Exception
and not a number any more, so that test fails. How can I extract any meaningful information from that exception, now? The wasm-internal representation of theStandard_Failure
type seems to be opaque for me, which is why I cannot create aWebAssembly.Tag
as suggested in the MDN docs (I think).Beta Was this translation helpful? Give feedback.
All reactions