-
Notifications
You must be signed in to change notification settings - Fork 464
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
Abort with fatal error when error-handling fails #48
Comments
We've been down this road before. How can we abort portably without replicating node::FatalError()? |
Previous discussion was about being able to call In this case, if N-API functions fail when handling an error in the C++ wrapper, then the options are:
The suggestion here is to expose a fatal error function directly as Now, all this may be a waste of effort since |
This was done in #70 |
If we encounter another error while handling an error, the best thing to do would be to abort with a fatal error message. We'll need a
napi_fatal_error()
or similar API for that, which doesn't exist yet. Currently the error-handling code just has asserts, which are only helpful in debug mode.See also:
The text was updated successfully, but these errors were encountered: