File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 ModuleNotFoundError ( module , err , dependencies ) {
6- Error . call ( this ) ;
7- Error . captureStackTrace ( this , ModuleNotFoundError ) ;
8- this . name = "ModuleNotFoundError" ;
9- this . message = "Module not found: " + err ;
10- this . details = err . details ;
11- this . missing = err . missing ;
12- this . module = module ;
13- this . origin = module ;
14- this . dependencies = dependencies ;
15- this . error = err ;
5+ "use strict" ;
6+
7+ class ModuleNotFoundError extends Error {
8+ constructor ( module , err , dependencies ) {
9+ super ( ) ;
10+ if ( Error . hasOwnProperty ( "captureStackTrace" ) ) {
11+ Error . captureStackTrace ( this , this . constructor ) ;
12+ }
13+ this . name = "ModuleNotFoundError" ;
14+ this . message = "Module not found: " + err ;
15+ this . details = err . details ;
16+ this . missing = err . missing ;
17+ this . module = module ;
18+ this . origin = module ;
19+ this . dependencies = dependencies ;
20+ this . error = err ;
21+ }
1622}
17- module . exports = ModuleNotFoundError ;
1823
19- ModuleNotFoundError . prototype = Object . create ( Error . prototype ) ;
20- ModuleNotFoundError . prototype . constructor = ModuleNotFoundError ;
24+ module . exports = ModuleNotFoundError ;
You can’t perform that action at this time.
0 commit comments