Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't re-throw uncaught exceptions while running in Node environment #1

Open
ChrisLoer opened this issue Jan 25, 2017 · 0 comments
Open

Comments

@ChrisLoer
Copy link
Contributor

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.

/cc @anandthakker @lbud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant