Hi there,
I'm back with more exception-related questions! :)
Now I'm trying to handle (or at least, correctly log) an unhandled exception thrown from JS.
Something like this:
But when the JS throws an object, like:
I get pretty much the same results when throwing a CLR object from JS, with the exception's Message getting "[object HostObject]".
So is there any other way to catch in .NET objects thrown from JS?
Thanks!
I'm back with more exception-related questions! :)
Now I'm trying to handle (or at least, correctly log) an unhandled exception thrown from JS.
Something like this:
engine.Execute("throw 'hello'");
will throw a ScriptEngineException with its Message set to 'hello'.But when the JS throws an object, like:
engine.Execute("throw { field: 'hello' }");
it looks like there is no way to retrieve the object from the ScriptEngineException, whose Message only says "[object Object]".I get pretty much the same results when throwing a CLR object from JS, with the exception's Message getting "[object HostObject]".
So is there any other way to catch in .NET objects thrown from JS?
Thanks!