1 | /*
|
2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
3 | Author Tobias Koppers @sokra
|
4 | */
|
5 |
|
6 | ;
|
7 |
|
8 | const WebpackError = require("./WebpackError");
|
9 |
|
10 | /** @typedef {import("./Chunk")} Chunk */
|
11 |
|
12 | class 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 |
|
33 | module.exports = ChunkRenderError;
|