Files
node/test/message/throw_null_traced.js
Anna Henningsen dc58731e28 cli: add --trace-uncaught flag
Add a flag that makes Node.js print the stack trace at the
time of *throwing* uncaught exceptions, rather than at the
creation of the `Error` object, if there is any.

This is disabled by default because it affects GC behavior.

PR-URL: https://github.com/nodejs/node/pull/30025
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2020-02-06 02:48:49 +00:00

7 lines
121 B
JavaScript

// Flags: --trace-uncaught
'use strict';
require('../common');
// eslint-disable-next-line no-throw-literal
throw null;