Hi again,
When you use V8, ClearScript marshals host exceptions to script code. In the above, the host exception should be accessible via
Another possibility (and one that works with all script engines) is to use ClearScript's
Good luck!
When you use V8, ClearScript marshals host exceptions to script code. In the above, the host exception should be accessible via
err.hostException
. Note that this is likely to be an instance of TargetInvocationException
, so you might want to use err.hostException.GetBaseException()
to access the "root" exception (see here).Another possibility (and one that works with all script engines) is to use ClearScript's
HostFunctions.tryCatch
.Good luck!