Skip to content

Commit 00f3de5

Browse files
author
Mohsen Azimi
committed
Refactor WebpackError to initialize details as undefined
1 parent c1a3676 commit 00f3de5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/WebpackError.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
"use strict";
66

77
module.exports = class WebpackError extends Error {
8+
constructor(message) {
9+
super(message);
10+
this.name = 'WebpackError';
11+
this.message = message;
12+
Error.captureStackTrace(this, this.constructor);
13+
14+
/** @type {string} */
15+
this.details = undefined;
16+
}
17+
818
inspect() {
919
return this.stack + (this.details ? `\n${this.details}` : "");
1020
}

0 commit comments

Comments
 (0)