Execute the 'finally' block when to exception has been thrown.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-06-05 07:55:52 +02:00
parent 384b057c93
commit 4267bb2f26
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 9 additions and 1 deletions

View File

@ -3909,7 +3909,15 @@ static sxi32 VmByteCodeExec(
ph7_exception **apException; ph7_exception **apException;
/* Pop the loaded exception */ /* Pop the loaded exception */
apException = (ph7_exception **)SySetBasePtr(&pVm->aException); apException = (ph7_exception **)SySetBasePtr(&pVm->aException);
if(pException == apException[SySetUsed(&pVm->aException) - 1]) { if(pException && pException == apException[SySetUsed(&pVm->aException) - 1]) {
if(SySetUsed(&pException->sFinally)) {
/* Execute the 'finally' block */
rc = VmExecFinallyBlock(&(*pVm), pException);
if(rc == SXERR_ABORT) {
/* Abort processing immediately */
goto Abort;
}
}
(void)SySetPop(&pVm->aException); (void)SySetPop(&pVm->aException);
} }
} }