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