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