Skip to content

Commit 6e70c5c

Browse files
committed
src: --abort-on-uncaught-exception in NODE_OPTIONS
Allow --abort-on-uncaught-exception in NODE_OPTIONS, its useful to enable for post-mortem debugging. PR-URL: nodejs#13932 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3a6dcdf commit 6e70c5c

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

doc/api/cli.md

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 1 deletion
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');

0 commit comments

Comments
 (0)