diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2020-05-22 15:18:21 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2020-05-30 05:18:16 +0300 |
commit | 6cc94b2d7f69f1f541f7c5de3cb86e569fbd4aa3 (patch) | |
tree | e385f48260c053d3ff2a25213d517b394eada482 /lib/internal/errors.js | |
parent | ce025d9233351bab786c46fd3e97c9e95b78ff2c (diff) |
errors: fully inspect errors on exit
This makes sure errors are fully inspected during exit. That is
important to provide as many debugging information to the user as
possible.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/33523
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/errors.js')
-rw-r--r-- | lib/internal/errors.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 5af14fe60b0..d3ca1ea1a6b 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -16,6 +16,7 @@ const { JSONStringify, Map, MathAbs, + MathMax, NumberIsInteger, ObjectDefineProperty, ObjectKeys, @@ -700,7 +701,11 @@ const fatalExceptionStackEnhancers = { require('internal/tty').hasColors()) || defaultColors); try { - return inspect(error, { colors }); + return inspect(error, { + colors, + customInspect: false, + depth: MathMax(inspect.defaultOptions.depth, 5) + }); } catch { return originalStack; } |