File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 22 MIT License http://www.opensource.org/licenses/mit-license.php
33 Author Tobias Koppers @sokra
44*/
5- function ChunkRenderError ( chunk , file , error ) {
6- Error . call ( this ) ;
7- Error . captureStackTrace ( this , ChunkRenderError ) ;
8- this . name = "ChunkRenderError" ;
9- this . error = error ;
10- this . message = error . message ;
11- this . details = error . stack ;
12- this . file = file ;
13- this . chunk = chunk ;
5+ "use strict" ;
6+
7+ class ChunkRenderError extends Error {
8+
9+ constructor ( chunk , file , error ) {
10+ super ( ) ;
11+
12+ if ( Error . hasOwnProperty ( "captureStackTrace" ) ) {
13+ Error . captureStackTrace ( this , this . constructor ) ;
14+ }
15+
16+ this . name = "ChunkRenderError" ;
17+ this . error = error ;
18+ this . message = error . message ;
19+ this . details = error . stack ;
20+ this . file = file ;
21+ this . chunk = chunk ;
22+ }
1423}
15- module . exports = ChunkRenderError ;
1624
17- ChunkRenderError . prototype = Object . create ( Error . prototype ) ;
18- ChunkRenderError . prototype . constructor = ChunkRenderError ;
25+ module . exports = ChunkRenderError ;
You can’t perform that action at this time.
0 commit comments