From c806fbdabe144c865612bbbc9ef596c9611c8310 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Sun, 19 Nov 2023 17:13:38 +0900 Subject: fix(ext,runtime): add missing custom inspections (#21219) --- ext/web/01_dom_exception.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'ext/web/01_dom_exception.js') diff --git a/ext/web/01_dom_exception.js b/ext/web/01_dom_exception.js index d876d90a6..941b057e4 100644 --- a/ext/web/01_dom_exception.js +++ b/ext/web/01_dom_exception.js @@ -131,19 +131,22 @@ class DOMException { return this[_code]; } - [SymbolFor("Deno.customInspect")](inspect) { + [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { if (ObjectPrototypeIsPrototypeOf(DOMExceptionPrototype, this)) { - return `DOMException: ${this[_message]}`; + return this[_error].stack; } else { - return inspect(createFilteredInspectProxy({ - object: this, - evaluate: false, - keys: [ - "message", - "name", - "code", - ], - })); + return inspect( + createFilteredInspectProxy({ + object: this, + evaluate: false, + keys: [ + "message", + "name", + "code", + ], + }), + inspectOptions, + ); } } } -- cgit v1.2.3