Skip to content

Commit

Permalink
Merge pull request #8738 from hiroppy/feature/modify-WebpackError.uni…
Browse files Browse the repository at this point in the history
…ttest

make use of `nodejs.util.inspect.custom`
  • Loading branch information
sokra committed Feb 6, 2019
2 parents 74b8aac + 2fdcff3 commit 109db05
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 109db05

Please sign in to comment.