UNPKG

609 BJavaScriptView Raw
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Jarid Margolin @jaridmargolin
4*/
5"use strict";
6
7class WebpackError extends Error {
8 /**
9 * Creates an instance of WebpackError.
10 * @param {string=} message error message
11 */
12 constructor(message) {
13 super(message);
14
15 this.details = undefined;
16 this.missing = undefined;
17 this.origin = undefined;
18 this.dependencies = undefined;
19 this.module = undefined;
20
21 Error.captureStackTrace(this, this.constructor);
22 }
23
24 inspect() {
25 return this.stack + (this.details ? `\n${this.details}` : "");
26 }
27}
28
29module.exports = WebpackError;