mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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>
This commit is contained in:
1 parent
0f0720a665
commit
76b06e53c6
2 files changed
+7
-2
No files matched your search
@@ -16,6 +16,7 @@ const {
|
||||
JSONStringify,
|
||||
Map,
|
||||
MathAbs,
|
||||
MathMax,
|
||||
NumberIsInteger,
|
||||
ObjectDefineProperty,
|
||||
ObjectKeys,
|
||||
@@ -695,7 +696,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;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,6 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
|
||||
at *
|
||||
at *
|
||||
at *,
|
||||
expected: [Object],
|
||||
expected: { bar: true },
|
||||
operator: 'throws'
|
||||
}
|
||||
Reference in new issue
Block a user