Skip to content

Commit

Permalink
fix(lib/WebpackError): make use of nodejs.util.inspect.custom
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Feb 6, 2019
1 parent dbc0b8d commit 2fdcff3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/WebpackError.js
Expand Up @@ -4,6 +4,8 @@
*/
"use strict";

const inspect = require("util").inspect.custom;

class WebpackError extends Error {
/**
* Creates an instance of WebpackError.
Expand All @@ -21,7 +23,7 @@ class WebpackError extends Error {
Error.captureStackTrace(this, this.constructor);
}

inspect() {
[inspect]() {
return this.stack + (this.details ? `\n${this.details}` : "");
}
}
Expand Down

0 comments on commit 2fdcff3

Please sign in to comment.