ModuleHashingError.js 680 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const WebpackError = require("./WebpackError");
  7. /** @typedef {import("./Module")} Module */
  8. class ModuleHashingError extends WebpackError {
  9. /**
  10. * Create a new ModuleHashingError
  11. * @param {Module} module related module
  12. * @param {Error} error Original error
  13. */
  14. constructor(module, error) {
  15. super();
  16. /** @type {string} */
  17. this.name = "ModuleHashingError";
  18. this.error = error;
  19. this.message = error.message;
  20. this.details = error.stack;
  21. this.module = module;
  22. }
  23. }
  24. /** @type {typeof ModuleHashingError} */
  25. module.exports = ModuleHashingError;