From 714013942399417d4531a21e5cd68af9f8ab05a8 Mon Sep 17 00:00:00 2001 From: Taylor Cannon Date: Wed, 17 Jan 2024 14:35:48 -0600 Subject: [PATCH] this should work --- runtime.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime.go b/runtime.go index 8b7a3995..d2cac64d 100644 --- a/runtime.go +++ b/runtime.go @@ -334,6 +334,10 @@ func (e *Exception) NativeError() error { } func (e *Exception) StringifyError(r *Runtime) string { + if e.val.baseObject(r).self.className() == stringError.String() { + return e.Error() + } + val := r.builtinJSON_stringify(FunctionCall{ Arguments: []Value{ e.val,