Rename CPlugin::SetErrorState to EvictWithError.

This commit is contained in:
David Anderson
2015-10-31 17:25:59 -07:00
parent c4c6efb140
commit 82ff7d5af7
4 changed files with 19 additions and 21 deletions
+4 -4
View File
@@ -390,7 +390,7 @@ static cell_t SetFailState(IPluginContext *pContext, const cell_t *params)
if (params[0] == 1)
{
pPlugin->SetErrorState(Plugin_Failed, "%s", str);
pPlugin->EvictWithError(Plugin_Failed, "%s", str);
return pContext->ThrowNativeErrorEx(SP_ERROR_ABORTED, "%s", str);
}
@@ -402,10 +402,10 @@ static cell_t SetFailState(IPluginContext *pContext, const cell_t *params)
DetectExceptions eh(pContext);
g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 1);
if (eh.HasException()) {
pPlugin->SetErrorState(Plugin_Failed, "%s", str);
pPlugin->EvictWithError(Plugin_Failed, "%s", str);
return 0;
}
pPlugin->SetErrorState(Plugin_Failed, "%s", buffer);
pPlugin->EvictWithError(Plugin_Failed, "%s", buffer);
pContext->ReportFatalError("%s", buffer);
return 0;
}
@@ -674,7 +674,7 @@ static cell_t RequireFeature(IPluginContext *pContext, const cell_t *params)
g_pSM->Format(default_message, sizeof(default_message), "Feature \"%s\" not available", name);
msg = default_message;
}
pPlugin->SetErrorState(Plugin_Error, "%s", msg);
pPlugin->EvictWithError(Plugin_Error, "%s", msg);
if (!eh.HasException())
pContext->ReportFatalError("%s", msg);