From 888abe91af16bfd65595fdec971baeb4afa95614 Mon Sep 17 00:00:00 2001 From: Kevin Eady <8634912+KevinEady@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:06:02 +0100 Subject: [PATCH] Address review comments Co-authored-by: Chengzhong Wu --- napi-inl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/napi-inl.h b/napi-inl.h index 9805534c4..5544d3fca 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -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 }