- catch and rethrow c++ exceptions
This commit is contained in:
parent
47485194f4
commit
f321f64a05
6 changed files with 41 additions and 39 deletions
|
|
@ -86,7 +86,10 @@ static int Exec(VMFrameStack *stack, const VMOP *pc, VMReturn *ret, int numret)
|
|||
int result = sfunc->JitFunc(stack, ret, numret, &exceptInfo);
|
||||
if (exceptInfo.reason != -1)
|
||||
{
|
||||
ThrowAbortException(sfunc, exceptInfo.pcOnJitAbort, (EVMAbortException)exceptInfo.reason, nullptr);
|
||||
if (exceptInfo.cppException)
|
||||
std::rethrow_exception(exceptInfo.cppException);
|
||||
else
|
||||
ThrowAbortException(sfunc, exceptInfo.pcOnJitAbort, (EVMAbortException)exceptInfo.reason, nullptr);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue