UNPKG

709 BJavaScriptView Raw
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8const WebpackError = require("./WebpackError");
9
10/** @typedef {import("./Chunk")} Chunk */
11
12class ChunkRenderError extends WebpackError {
13 /**
14 * Create a new ChunkRenderError
15 * @param {Chunk} chunk A chunk
16 * @param {string} file Related file
17 * @param {Error} error Original error
18 */
19 constructor(chunk, file, error) {
20 super();
21
22 this.name = "ChunkRenderError";
23 this.error = error;
24 this.message = error.message;
25 this.details = error.stack;
26 this.file = file;
27 this.chunk = chunk;
28
29 Error.captureStackTrace(this, this.constructor);
30 }
31}
32
33module.exports = ChunkRenderError;