1 |
|
2 |
|
3 |
|
4 |
|
5 | "use strict";
|
6 |
|
7 | const inspect = require("util").inspect.custom;
|
8 |
|
9 | class WebpackError extends Error {
|
10 | |
11 |
|
12 |
|
13 |
|
14 | constructor(message) {
|
15 | super(message);
|
16 |
|
17 | this.details = undefined;
|
18 | this.missing = undefined;
|
19 | this.origin = undefined;
|
20 | this.dependencies = undefined;
|
21 | this.module = undefined;
|
22 |
|
23 | Error.captureStackTrace(this, this.constructor);
|
24 | }
|
25 |
|
26 | [inspect]() {
|
27 | return this.stack + (this.details ? `\n${this.details}` : "");
|
28 | }
|
29 | }
|
30 |
|
31 | module.exports = WebpackError;
|