Browse Source

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>
v6
Ruben Bridgewater 8 years ago
committed by Refael Ackermann
parent
commit
0401754b92
  1. 1
      lib/internal/errors.js

1
lib/internal/errors.js

@ -28,7 +28,6 @@ function makeNodeError(Base) {
constructor(key, ...args) {
super(message(key, args));
this[kCode] = key;
Error.captureStackTrace(this, NodeError);
}
get name() {

Loading…
Cancel
Save