- add first draft of abort exceptions
This commit is contained in:
parent
c89d8bb9bb
commit
6424190cbf
3 changed files with 72 additions and 2 deletions
|
|
@ -80,8 +80,18 @@ static int Exec(VMFrameStack *stack, const VMOP *pc, VMReturn *ret, int numret)
|
|||
sfunc->JitFunc = JitCompile(sfunc);
|
||||
sfunc->JitCompiled = true;
|
||||
}
|
||||
if (sfunc->JitFunc)
|
||||
return sfunc->JitFunc(stack, ®, ret, numret);
|
||||
if (sfunc->JitFunc) {
|
||||
try {
|
||||
return sfunc->JitFunc(stack, ®, ret, numret);
|
||||
}
|
||||
catch (CVMAbortException &err)
|
||||
{
|
||||
err.MaybePrintMessage();
|
||||
err.stacktrace.AppendFormat("Called from %s at %s, line %d\n", sfunc->PrintableName.GetChars(), sfunc->SourceFileName.GetChars(), sfunc->PCToLine(sfunc->pcOnJitAbort));
|
||||
// PrintParameters(reg.param + f->NumParam - B, B);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void *ptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue