> Even with exception support disabled, you can still throw them, you just can't catch them in C++ land.
Is something printed in the console under emscripten if an exception is thrown?
Re:Simple diet tricks for asm.js
by hackcasual on Saturday August 27, 2016 @04:53PM
(#12374124)
It gets converted into a Javascript exception, which will at least give you the Emscripten converted function it was thrown in.
2 other points I'd add to this overall:
1) Can't emphasize enough how bad exception support is for size, expect in the neighborhood of 30% size increase. This is due to needing to handle all of the possible ways functions can return. Even with exception support disabled, you can still throw them, you just can't catch them in C++ land.
2) goto's. There's a few good reasons to use these, especially in code that needs to make sure cleanup code always runs. Emscripten supports that with a couple different code constructs, pretty much all of which cause a significant amount of bloat. We've saved ~100k in some cases by specifically targeting some 3rd party code that made use of them and rewritting them to not have gotos.