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 <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
sam-github authored and MylesBorins committed Oct 25, 2017
1 parent dd946c3 commit cccf5a6
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 cccf5a6

Please sign in to comment.