ChunkRenderError.js 838 B

1234567891011121314151617181920212223242526272829303132333435363738
  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("./Chunk")} Chunk */
  8. class ChunkRenderError extends WebpackError {
  9. /**
  10. * Create a new ChunkRenderError
  11. * @param {Chunk} chunk A chunk
  12. * @param {string} file Related file
  13. * @param {Error} error Original error
  14. */
  15. constructor(chunk, file, error) {
  16. super();
  17. /** @type {string} */
  18. this.name = "ChunkRenderError";
  19. /** @type {Chunk} */
  20. this.chunk = chunk;
  21. /** @type {string} */
  22. this.file = file;
  23. /** @type {Error} */
  24. this.error = error;
  25. /** @type {string} */
  26. this.message = error.message;
  27. /** @type {string} */
  28. this.details = error.stack;
  29. }
  30. }
  31. /** @type {typeof ChunkRenderError} */
  32. module.exports = ChunkRenderError;