-
Notifications
You must be signed in to change notification settings - Fork 462
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
feat: allow catching all exceptions #1593
Conversation
I'd like to discuss the naming of the new define We can use |
We discuss in the 18 Oct Node-API meeting:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this branch in sync with the main
?
fc130ef
to
22357ab
Compare
22357ab
to
b06737b
Compare
b06737b
to
1e1e05e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1593 +/- ##
==========================================
- Coverage 66.35% 66.29% -0.07%
==========================================
Files 3 3
Lines 2143 2154 +11
Branches 703 708 +5
==========================================
+ Hits 1422 1428 +6
Misses 150 150
- Partials 571 576 +5 ☔ View full report in Codecov by Sentry. |
Hi @vmoroz @mhdawson @legendecas @gabrielschulhof , I believe this is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! A minor suggestion...
Co-authored-by: Chengzhong Wu <[email protected]>
888abe9
to
df4e6b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add new compile-time define (
NODE_ADDON_API_CPP_EXCEPTIONS_ALL
) to enable catching all exceptions. This must be used in conjunction withNODE_ADDON_API_CPP_EXCEPTIONS
.Rename the
NAPI_
prefixed exception preprocessor definitions (NAPI_CPP_EXCEPTIONS
andNAPI_DISABLE_CPP_EXCEPTIONS
) to be prefixed with our standardNODE_ADDON_API_
prefix in a backwards-compatible way.Fixes: #1555