Browse Source

Remove StdError constructor call from error stack traces (#367)

no-retry
Rich Hodgkins 8 years ago
committed by Sindre Sorhus
parent
commit
4b49df20f0
  1. 1
      index.js

1
index.js

@ -567,6 +567,7 @@ for (const method of methods) {
class StdError extends Error {
constructor(message, error, opts) {
super(message);
Error.captureStackTrace(this, this.constructor);
this.name = 'StdError';
if (error.code !== undefined) {

Loading…
Cancel
Save