Fix Call_Finish propagating exceptions to the caller (#2510)
This commit is contained in:
@@ -558,12 +558,12 @@ static cell_t sm_CallFinish(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
auto local_args = sArgs;
|
||||
|
||||
// Note: Execute() swallows exceptions, so this is okay.
|
||||
// Note: ExceptionHandler and Execute() swallow exceptions, so this is okay.
|
||||
if (s_pFunction)
|
||||
{
|
||||
IPluginFunction *pFunction = s_pFunction;
|
||||
ResetCall();
|
||||
DetectExceptions eh(pContext);
|
||||
ExceptionHandler eh(pContext);
|
||||
if (!pFunction->Invoke(local_args, result))
|
||||
return eh.Code();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user