WebpackError.js 609 B

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