Added request
amb231 (OnPluginStart errors cause load failures)
1.1 --- a/core/systems/PluginSys.cpp Wed May 23 01:44:00 2007 +0000
1.2 +++ b/core/systems/PluginSys.cpp Wed May 23 01:59:58 2007 +0000
1.3 @@ -295,7 +295,11 @@
1.4 return;
1.5 }
1.6
1.7 - pFunction->Execute(&result);
1.8 + int err;
1.9 + if ((err=pFunction->Execute(&result)) != SP_ERROR_NONE)
1.10 + {
1.11 + SetErrorState(Plugin_Error, "Error detected in plugin startup (see error logs)");
1.12 + }
1.13 }
1.14
1.15 void CPlugin::Call_OnPluginEnd()
1.16 @@ -1061,7 +1065,7 @@
1.17 pPlugin->Call_OnPluginStart();
1.18
1.19 /* Now, if we have fake natives, go through all plugins that might need rebinding */
1.20 - if (pPlugin->m_fakeNatives.size())
1.21 + if (pPlugin->GetStatus() >= Plugin_Paused && pPlugin->m_fakeNatives.size())
1.22 {
1.23 List<CPlugin *>::iterator pl_iter;
1.24 CPlugin *pOther;
2.1 --- a/plugins/include/sourcemod.inc Wed May 23 01:44:00 2007 +0000
2.2 +++ b/plugins/include/sourcemod.inc Wed May 23 01:59:58 2007 +0000
2.3 @@ -218,7 +218,7 @@
2.4 *
2.5 * @param string Message to print.
2.6 * @noreturn
2.7 - * @error Always.
2.8 + * @error Always throws SP_ERROR_ABORT.
2.9 */
2.10 native SetFailState(const String:string[]);
2.11