Skip to content

Commit 859747d

Browse files
authored
Merge pull request #3 from gms1/fix/exception-handling
This fixes the contradictory configuration pointed out here: microsoft#47 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.
2 parents c0a8604 + 48e95e8 commit 859747d

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

binding.gyp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@
88
"targets": [
99
{
1010
"target_name": "<(module_name)",
11-
"cflags!": [ "-fno-exceptions" ],
12-
"cflags_cc!": [ "-fno-exceptions" ],
13-
"xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
11+
"xcode_settings": {
1412
"CLANG_CXX_LIBRARY": "libc++",
1513
"MACOSX_DEPLOYMENT_TARGET": "10.7",
1614
},
17-
"msvs_settings": {
18-
"VCCLCompilerTool": { "ExceptionHandling": 1 },
19-
},
2015
"include_dirs": [
2116
"<!@(node -p \"require('node-addon-api').include\")"],
2217
"conditions": [
@@ -40,7 +35,7 @@
4035
},
4136
{
4237
"dependencies": [
43-
"<!(node -p \"require('node-addon-api').gyp\")",
38+
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
4439
"deps/sqlite3.gyp:sqlite3"
4540
]
4641
}
@@ -52,7 +47,7 @@
5247
"src/node_sqlite3.cc",
5348
"src/statement.cc"
5449
],
55-
"defines": [ "NAPI_VERSION=<(napi_build_version)", "NAPI_DISABLE_CPP_EXCEPTIONS=1" ]
50+
"defines": [ "NAPI_VERSION=<(napi_build_version)" ]
5651
}
5752
]
5853
}

docs/DEVELOP.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ This project uses [npm version](https://docs.npmjs.com/cli/v10/commands/npm-vers
2626
- Upload them as release assets
2727
- Publish the package to npm
2828

29-
3. ** Create GitHub Release from tag
29+
3. ** Edit the generated Pre-release
30+
- select "Generate release notes"
31+
- uncheck "Set as pre-release"
32+
- check "Set as latest release" if it is
33+
- click "Update Releasse
3034

3135
### Version format
3236

0 commit comments

Comments
 (0)