Merge pull request #3723 from acemod/syncErrorLog

Improve synced event error logging
This commit is contained in:
Glowbal 2016-04-25 23:40:56 +02:00
commit a90f48efb9
5 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,7 @@ if (isServer) then {
params ["_eventName", "_client"];
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
ACE_LOGERROR("Request for synced event - key not found.");
ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
false
};

View File

@ -17,7 +17,7 @@
params ["_name", "_args", "_ttl"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Synced event key not found.");
ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
false
};

View File

@ -10,6 +10,9 @@
* Return Value:
* Boolean of success <BOOL>
*
* Example:
* ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
*
* Public: Yes
*/
#include "script_component.hpp"
@ -17,7 +20,7 @@
params ["_name", "_handler", ["_ttl", 0]];
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Duplicate synced event creation.");
ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
false
};

View File

@ -15,7 +15,7 @@
params ["_name"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Synced event key not found.");
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
false
};

View File

@ -17,7 +17,7 @@
params ["_name", "_args", ["_ttl", 0]];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR("Synced event key not found.");
ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
false
};