diff options
Diffstat (limited to 'ext/console/01_console.js')
-rw-r--r-- | ext/console/01_console.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/console/01_console.js b/ext/console/01_console.js index 11b6c549c..6cf3c6dca 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -37,6 +37,7 @@ const { Error, ErrorCaptureStackTrace, ErrorPrototype, + ErrorPrototypeToString, FunctionPrototypeBind, FunctionPrototypeCall, FunctionPrototypeToString, @@ -1578,7 +1579,7 @@ function inspectError(value, ctx) { if (stack?.includes("\n at")) { finalMessage += stack; } else { - finalMessage += `[${stack || value.toString()}]`; + finalMessage += `[${stack || ErrorPrototypeToString(value)}]`; } } finalMessage += ArrayPrototypeJoin( |