Skip to content

Commit a76c2ae

Browse files
sam-githubMylesBorins
authored andcommitted
src: --abort-on-uncaught-exception in NODE_OPTIONS
Allow --abort-on-uncaught-exception in NODE_OPTIONS, its useful to enable for post-mortem debugging. Backport-PR-URL: #12677 PR-URL: #13932 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c98baa4 commit a76c2ae

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

doc/api/cli.md

+1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ Node options that are allowed are:
367367
- `--zero-fill-buffers`
368368

369369
V8 options that are allowed are:
370+
- `--abort-on-uncaught-exception`
370371
- `--max_old_space_size`
371372

372373

src/node.cc

+1
Original file line numberDiff line numberDiff line change
@@ -3811,6 +3811,7 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env,
38113811
"--icu-data-dir",
38123812

38133813
// V8 options
3814+
"--abort-on-uncaught-exception",
38143815
"--max_old_space_size",
38153816
};
38163817

test/parallel/test-cli-node-options.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function disallow(opt) {
4141

4242
const printA = require.resolve('../fixtures/printA.js');
4343

44-
expect('-r ' + printA, 'A\nB\n');
44+
expect(`-r ${printA}`, 'A\nB\n');
45+
expect('--abort-on-uncaught-exception', 'B\n');
4546
expect('--no-deprecation', 'B\n');
4647
expect('--no-warnings', 'B\n');
4748
expect('--trace-warnings', 'B\n');
@@ -58,7 +59,7 @@ if (common.hasCrypto) {
5859
}
5960
expect('--icu-data-dir=_d', 'B\n');
6061

61-
// V8 options
62+
// V8 options
6263
expect('--max_old_space_size=0', 'B\n');
6364

6465
function expect(opt, want) {

0 commit comments

Comments
 (0)