From 48e95e8a0d32277449c269b41fba6419acb21418 Mon Sep 17 00:00:00 2001 From: Guenter Sandner Date: Sat, 28 Mar 2026 09:08:07 +0100 Subject: [PATCH] fix exception handling This fixes the contradictory configuration where compiler flags enabled C++ exceptions but NAPI_DISABLE_CPP_EXCEPTIONS=1 told node-addon-api to disable them. Now C++ exceptions are properly enabled throughout the stack. --- binding.gyp | 11 +++-------- docs/DEVELOP.md | 6 +++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/binding.gyp b/binding.gyp index a8fccd0c..0f7e2d5b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -8,15 +8,10 @@ "targets": [ { "target_name": "<(module_name)", - "cflags!": [ "-fno-exceptions" ], - "cflags_cc!": [ "-fno-exceptions" ], - "xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES", + "xcode_settings": { "CLANG_CXX_LIBRARY": "libc++", "MACOSX_DEPLOYMENT_TARGET": "10.7", }, - "msvs_settings": { - "VCCLCompilerTool": { "ExceptionHandling": 1 }, - }, "include_dirs": [ "