From c45df83b54744ce5b9dcb20b9f8a8355085991a4 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 26 Jun 2017 11:24:33 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/13932 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/cli.md | 1 + src/node.cc | 1 + test/parallel/test-cli-node-options.js | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 77973a543f0732..0c88eeca175358 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -457,6 +457,7 @@ Node options that are allowed are: - `--zero-fill-buffers` V8 options that are allowed are: +- `--abort-on-uncaught-exception` - `--max_old_space_size` ### `NODE_PENDING_DEPRECATION=1` diff --git a/src/node.cc b/src/node.cc index 70f5bbb3032115..944ba6deddd729 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3766,6 +3766,7 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env, "--icu-data-dir", // V8 options + "--abort-on-uncaught-exception", "--max_old_space_size", }; diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 8622dafbe10af3..558aae44ef3775 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -40,6 +40,7 @@ function disallow(opt) { const printA = require.resolve('../fixtures/printA.js'); +expect('--abort-on-uncaught-exception', 'B\n'); expect(`-r ${printA}`, 'A\nB\n'); expect('--no-deprecation', 'B\n'); expect('--no-warnings', 'B\n');