webpack/lib/ModuleDependencyWarning.js

26 lines
554 B
JavaScript
Raw Normal View History

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
2017-01-10 13:00:03 +08:00
"use strict";
const WebpackError = require("./WebpackError");
2017-01-10 13:00:03 +08:00
module.exports = class ModuleDependencyWarning extends WebpackError {
2017-01-10 13:00:03 +08:00
constructor(module, err, loc) {
super(err.message);
2017-01-10 13:00:03 +08:00
this.name = "ModuleDependencyWarning";
2018-02-25 09:00:20 +08:00
this.details = err.stack
.split("\n")
.slice(1)
.join("\n");
this.module = module;
this.loc = loc;
2017-01-10 13:00:03 +08:00
this.error = err;
2018-06-04 22:23:41 +08:00
this.origin = module.issuer;
Error.captureStackTrace(this, this.constructor);
2017-01-10 13:00:03 +08:00
}
2017-01-11 17:51:58 +08:00
};