Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/pseudo-tty/test-fatal-error.js

11 lines
178 B
JavaScript
Raw Permalink Normal View History

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>
2019-04-15 20:10:17 +02:00
'use strict';
require('../common');
const { inspect } = require('util');
inspect.defaultOptions.colors = true;
const err = new TypeError('foobar');
err.bla = true;
throw err;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 3192ms Template: 18ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API