Skip to content

Commit

Permalink
Merge pull request webpack#4544 from davegonzalez/feature/es6-refacto…
Browse files Browse the repository at this point in the history
…r-entrymodulenotfounderror

ES6ify EntryModuleNotFoundError
  • Loading branch information
sokra authored Mar 25, 2017
2 parents 6b209b1 + f53cbe7 commit 2e87cab
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/EntryModuleNotFoundError.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function EntryModuleNotFoundError(err) {
Error.call(this);
this.name = "EntryModuleNotFoundError";
this.message = "Entry module not found: " + err;
this.details = err.details;
this.error = err;
Error.captureStackTrace(this, EntryModuleNotFoundError);
"use strict";

class EntryModuleNotFoundError extends Error {
constructor(err) {
super();
this.name = "EntryModuleNotFoundError";
this.message = "Entry module not found: " + err;
this.details = err.details;
this.error = err;
Error.captureStackTrace(this, EntryModuleNotFoundError);
}
}
module.exports = EntryModuleNotFoundError;

EntryModuleNotFoundError.prototype = Object.create(Error.prototype);
EntryModuleNotFoundError.prototype.constructor = EntryModuleNotFoundError;
module.exports = EntryModuleNotFoundError;

0 comments on commit 2e87cab

Please sign in to comment.