mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
a9f518c901
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>
11 lines
178 B
JavaScript
11 lines
178 B
JavaScript
'use strict';
|
|
require('../common');
|
|
|
|
const { inspect } = require('util');
|
|
|
|
inspect.defaultOptions.colors = true;
|
|
|
|
const err = new TypeError('foobar');
|
|
err.bla = true;
|
|
throw err;
|