You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a host function calls an exported WASM function, which in turn calls an imported host function, and the host function throws an exception, I would have expected the exception be thrown all the way back up to the originating host function - however, the application just crashes.
Is there something internally happening that prevents exceptions from being propagated correctly?
The text was updated successfully, but these errors were encountered:
Hmm, do you have some small self-contained example? What version are you using, 0.7.0 or master? In master we are right now undergoing some changes to make execution "noexcept", due to speed reasons, which would not allow propagating exceptions, rather host functions would need to return a trap. And we would need to add a way to attach some user-defined message to the trap.
Nothing self-contained but I can probably come up with one if need be.
However your explanation makes a lot of sense - I'm working from master, and the application seems to abort so that would make sense. Being able to attach data to a trap would be nice, though!
I have all of my bound functions wrapped with a single stub so this is actually quite easy to do for now (I can just store the exception somewhere and re-throw if I detect a trap). I'll give that a shot.
If a host function calls an exported WASM function, which in turn calls an imported host function, and the host function throws an exception, I would have expected the exception be thrown all the way back up to the originating host function - however, the application just crashes.
Is there something internally happening that prevents exceptions from being propagated correctly?
The text was updated successfully, but these errors were encountered: