When it's running in a Node environment, the Emscripten runtime will rethrow any uncaught exception:
process['on']('uncaughtException', function (ex) {
if (!(ex instanceof ExitStatus)) {
throw ex;
}
});
Although it doesn't mess with the stack trace, it means that if a developer runs into an uncaught exception while running the GL JS test suite, the first thing they see is a somewhat misleading error message showing an error being thrown from mapbox-gl-rtl-text.
This is part of a class of changes where the most straightforward place to make a change is in the Emscripten compiler, but I'd prefer not to start maintaining an Emscripten port. This is a simple enough case that I could maybe just take it out with a sed build step.
When it's running in a Node environment, the Emscripten runtime will rethrow any uncaught exception:
Although it doesn't mess with the stack trace, it means that if a developer runs into an uncaught exception while running the GL JS test suite, the first thing they see is a somewhat misleading error message showing an error being thrown from
mapbox-gl-rtl-text
.This is part of a class of changes where the most straightforward place to make a change is in the Emscripten compiler, but I'd prefer not to start maintaining an Emscripten port. This is a simple enough case that I could maybe just take it out with a
sed
build step./cc @anandthakker @lbud