diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-15 20:10:17 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-05-16 12:50:05 +0200 |
commit | a9f518c901459e42afc76871dab9867967e9fa23 (patch) | |
tree | 039da3b7206947dec05cdf4fbe6ccdf809c98db3 /test/parallel/test-error-reporting.js | |
parent | ac2f2cd919ec549f908d3eb0b7fc8a6726a0ac25 (diff) | |
download | node-new-a9f518c901459e42afc76871dab9867967e9fa23.tar.gz |
process: inspect error in case of a fatal exception
This makes sure that errors that shut down the application are
inspected with `util.inspect()`. That makes sure that all extra
properties on the error will be visible and also that the stack trace
is highlighted (Node.js internal frames will be grey and node modules
are underlined).
PR-URL: https://github.com/nodejs/node/pull/27243
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-error-reporting.js')
-rw-r--r-- | test/parallel/test-error-reporting.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js index f56f1e4bdc..7568206d46 100644 --- a/test/parallel/test-error-reporting.js +++ b/test/parallel/test-error-reporting.js @@ -77,5 +77,5 @@ errExec('throws_error6.js', common.mustCall((err, stdout, stderr) => { // Object that throws in toString() doesn't print garbage errExec('throws_error7.js', common.mustCall((err, stdout, stderr) => { - assert.ok(/<toString\(\) threw exception/.test(stderr)); + assert.ok(/throw {\r?\n\^\r?\n{ toString: \[Function: toString] }\r?\n$/.test(stderr)); })); |