ModuleHashingError.js 615 B

1234567891011121314151617181920212223242526272829
  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. this.name = "ModuleHashingError";
  17. this.error = error;
  18. this.message = error.message;
  19. this.details = error.stack;
  20. this.module = module;
  21. }
  22. }
  23. module.exports = ModuleHashingError;