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 committed Nov 11, 2024
1 parent 1e1e05e commit df4e6b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ 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 df4e6b1

Please sign in to comment.