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 ModuleWarning ( module , warning ) {
6- Error . call ( this ) ;
7- Error . captureStackTrace ( this , ModuleWarning ) ;
8- this . name = "ModuleWarning" ;
9- this . module = module ;
10- this . message = warning ;
11- this . warning = warning ;
5+ "use strict" ;
6+
7+ class ModuleWarning extends Error {
8+ constructor ( module , warning ) {
9+ super ( ) ;
10+
11+ if ( Error . hasOwnProperty ( "captureStackTrace" ) ) {
12+ Error . captureStackTrace ( this , this . constructor ) ;
13+ }
14+ this . name = "ModuleWarning" ;
15+ this . module = module ;
16+ this . message = warning ;
17+ this . warning = warning ;
18+ }
1219}
13- module . exports = ModuleWarning ;
1420
15- ModuleWarning . prototype = Object . create ( Error . prototype ) ;
16- ModuleWarning . prototype . constructor = ModuleWarning ;
21+ module . exports = ModuleWarning ;
You can’t perform that action at this time.
0 commit comments