2017-03-25 05:17:47 +08:00
|
|
|
/*
|
|
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
|
|
Author Jarid Margolin @jaridmargolin
|
|
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
module.exports = class WebpackError extends Error {
|
2018-04-06 13:59:58 +08:00
|
|
|
constructor(message) {
|
|
|
|
super(message);
|
|
|
|
this.name = 'WebpackError';
|
|
|
|
this.message = message;
|
|
|
|
Error.captureStackTrace(this, this.constructor);
|
|
|
|
|
|
|
|
/** @type {string} */
|
|
|
|
this.details = undefined;
|
|
|
|
}
|
|
|
|
|
2017-03-25 05:17:47 +08:00
|
|
|
inspect() {
|
|
|
|
return this.stack + (this.details ? `\n${this.details}` : "");
|
|
|
|
}
|
|
|
|
};
|