Incremental

This commit is contained in:
Gilbert Clark 2014-11-24 14:28:17 -05:00
parent be5cb549a9
commit 6055b56f5c
3 changed files with 114 additions and 122 deletions

View file

@ -268,18 +268,14 @@ ValWrapper* Func::HandlePluginResult(ValWrapper* plugin_result, val_list* args,
case FUNC_FLAVOR_EVENT:
if(plugin_result->value)
{
char sbuf[1024];
snprintf(sbuf, 1024, "plugin returned non-void result for event %s", this->Name());
reporter->InternalError(sbuf);
reporter->InternalError("plugin returned non-void result for event %s", this->Name());
}
break;
case FUNC_FLAVOR_HOOK:
if ( plugin_result->value->Type()->Tag() != TYPE_BOOL )
{
char sbuf[1024];
snprintf(sbuf, 1024, "plugin returned non-bool for hook %s", this->Name());
reporter->InternalError(sbuf);
reporter->InternalError("plugin returned non-bool for hook %s", this->Name());
}
break;
@ -291,16 +287,12 @@ ValWrapper* Func::HandlePluginResult(ValWrapper* plugin_result, val_list* args,
{
if(plugin_result && plugin_result->value)
{
char sbuf[1024];
snprintf(sbuf, 1024, "plugin returned non-void result for void method %s", this->Name());
reporter->InternalError(sbuf);
reporter->InternalError("plugin returned non-void result for void method %s", this->Name());
}
}
else if ( plugin_result->value && plugin_result->value->Type()->Tag() != yt->Tag() && yt->Tag() != TYPE_ANY)
{
char sbuf[1024];
snprintf(sbuf, 1024, "plugin returned wrong type (got %d, expecting %d) for %s", plugin_result->value->Type()->Tag(), yt->Tag(), this->Name());
reporter->InternalError(sbuf);
reporter->InternalError("plugin returned wrong type (got %d, expecting %d) for %s", plugin_result->value->Type()->Tag(), yt->Tag(), this->Name());
}
break;