From 2fdcff33b70de078559ee28d631dd25f32229254 Mon Sep 17 00:00:00 2001 From: Yuta Hiroto Date: Wed, 6 Feb 2019 18:27:56 +0900 Subject: [PATCH] fix(lib/WebpackError): make use of nodejs.util.inspect.custom --- lib/WebpackError.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/WebpackError.js b/lib/WebpackError.js index 891809a67e9..4f16001babe 100644 --- a/lib/WebpackError.js +++ b/lib/WebpackError.js @@ -4,6 +4,8 @@ */ "use strict"; +const inspect = require("util").inspect.custom; + class WebpackError extends Error { /** * Creates an instance of WebpackError. @@ -21,7 +23,7 @@ class WebpackError extends Error { Error.captureStackTrace(this, this.constructor); } - inspect() { + [inspect]() { return this.stack + (this.details ? `\n${this.details}` : ""); } }