You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a way to get the actual exception value thrown from js code in otto.Run. Currently the exception is converted to a errors.errorString. This way throw {foo:"bar"} becomes [object Object] and rethrowing the exception from js->go -> js via panic is not caught in the first level of js as the panic value is not a otto.Value.
My current workaround is calling my actual js code in a try-catch that returns a object with either {error:exception} or {ok:value} but a cleaner solution would be appreciated.
The text was updated successfully, but these errors were encountered:
I am looking for a way to get the actual exception value thrown from js code in otto.Run. Currently the exception is converted to a errors.errorString. This way throw {foo:"bar"} becomes [object Object] and rethrowing the exception from js->go -> js via panic is not caught in the first level of js as the panic value is not a otto.Value.
My current workaround is calling my actual js code in a try-catch that returns a object with either {error:exception} or {ok:value} but a cleaner solution would be appreciated.
The text was updated successfully, but these errors were encountered: