core/HandleSys.cpp
changeset 3278 00388f39f24b
parent 2959 1a7109501676
child 3837 f86a51ee4eb4
     1.1 --- a/core/HandleSys.cpp	Tue May 24 18:35:09 2011 -0400
     1.2 +++ b/core/HandleSys.cpp	Tue May 24 18:37:45 2011 -0400
     1.3 @@ -987,6 +987,10 @@
     1.4  	return true;
     1.5  }
     1.6  
     1.7 +#define HANDLE_LOG_VERY_BAD(message, ...) \
     1.8 +	g_Logger.LogFatal(message, ##__VA_ARGS__); \
     1.9 +	g_Logger.LogError(message, ##__VA_ARGS__);
    1.10 +
    1.11  bool HandleSystem::TryAndFreeSomeHandles()
    1.12  {
    1.13  	IPluginIterator *pl_iter = g_PluginSys.GetPluginIterator();
    1.14 @@ -1032,9 +1036,9 @@
    1.15  		return false;
    1.16  	}
    1.17  
    1.18 -	g_Logger.LogFatal("[SM] MEMORY LEAK DETECTED IN PLUGIN (file \"%s\")", highest_owner->GetFilename());
    1.19 -	g_Logger.LogFatal("[SM] Unloading plugin to free %d handles.", highest_handle_count);
    1.20 -	g_Logger.LogFatal("[SM] Contact the author(s) of this plugin to correct this error.", highest_handle_count);
    1.21 +	HANDLE_LOG_VERY_BAD("[SM] MEMORY LEAK DETECTED IN PLUGIN (file \"%s\")", highest_owner->GetFilename());
    1.22 +	HANDLE_LOG_VERY_BAD("[SM] Unloading plugin to free %d handles.", highest_handle_count);
    1.23 +	HANDLE_LOG_VERY_BAD("[SM] Contact the author(s) of this plugin to correct this error.", highest_handle_count);
    1.24  
    1.25  	highest_owner->GetBaseContext()->ThrowNativeErrorEx(SP_ERROR_MEMACCESS, "Memory leak");
    1.26