Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
KevinEady and legendecas authored Nov 11, 2024
1 parent 1e1e05e commit 888abe9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ inline void WrapVoidCallback(napi_env, Callable callback) {
}
#endif // NODE_ADDON_API_CPP_EXCEPTIONS_ALL
#else
// When C++ exceptions are disabled, errors are immediately thrown as JS
// exceptions, so there is no need to catch and rethrow them here.
// When C++ exceptions are disabled, there is no need to catch and rethrow C++ exceptions. JS errors should be thrown with `Error::ThrowAsJavaScriptException`.
callback();
#endif // NODE_ADDON_API_CPP_EXCEPTIONS
}
Expand Down

0 comments on commit 888abe9

Please sign in to comment.