I see there was mention of a more general version of this but I don't know where to look for follow-up.
Is there some sort of interface or magic return type we can use to signal the result of an invocation should be turned into a hosted script exception?
e.g. public void MyCLRMethod() {
if (errorCondition) {
}
script:
try {
catch(x) {
I need a way to raise errors in the .NET world that can be handled by the script (V8).
Is there some sort of interface or magic return type we can use to signal the result of an invocation should be turned into a hosted script exception?
e.g. public void MyCLRMethod() {
if (errorCondition) {
return new ITurnIntoaScriptingExceptionType('Oops you did something wrong');
}}
script:
try {
o.MyClrMethod();
}catch(x) {
// yay I was handled?
}I need a way to raise errors in the .NET world that can be handled by the script (V8).