errors: prevent stack recalculation
Newer v8 versions exclude the constructor from the stack trace so the recalculation of the trace can be avoided. PR-URL: https://github.com/nodejs/node/pull/13743 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
70b31adffa
commit
0401754b92
@ -28,7 +28,6 @@ function makeNodeError(Base) {
|
||||
constructor(key, ...args) {
|
||||
super(message(key, args));
|
||||
this[kCode] = key;
|
||||
Error.captureStackTrace(this, NodeError);
|
||||
}
|
||||
|
||||
get name() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user