Skip to content

Commit

Permalink
src: --abort-on-uncaught-exception in NODE_OPTIONS
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sam-github authored and MylesBorins committed Oct 16, 2017
1 parent c98baa4 commit a76c2ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ Node options that are allowed are:
- `--zero-fill-buffers`

V8 options that are allowed are:
- `--abort-on-uncaught-exception`
- `--max_old_space_size`


Expand Down
1 change: 1 addition & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3811,6 +3811,7 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env,
"--icu-data-dir",

// V8 options
"--abort-on-uncaught-exception",
"--max_old_space_size",
};

Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-cli-node-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ function disallow(opt) {

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

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

// V8 options
// V8 options
expect('--max_old_space_size=0', 'B\n');

function expect(opt, want) {
Expand Down

0 comments on commit a76c2ae

Please sign in to comment.