ChunkRenderError.js 657 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("./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. this.name = "ChunkRenderError";
  18. this.error = error;
  19. this.message = error.message;
  20. this.details = error.stack;
  21. this.file = file;
  22. this.chunk = chunk;
  23. }
  24. }
  25. module.exports = ChunkRenderError;