diff options
author | Shauren <shauren.trinity@gmail.com> | 2011-03-20 00:19:39 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2011-03-20 00:19:39 +0100 |
commit | a105f345a03c89e4f704d9c81388aad15787be63 (patch) | |
tree | 4065994af779299ed0ce40610560684f537d6a60 | |
parent | 3b343ac497f4295238cc1cbd77b2ae3825456080 (diff) |
Core/Shared: Removed #ifdef HAVE_ACE_STACK_TRACE_H which is only required for old ACE versions
-rwxr-xr-x | src/server/shared/Debugging/Errors.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index 756947b516b..52f0f4d74b8 100755 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -20,17 +20,13 @@ #define TRINITYCORE_ERRORS_H #include "Common.h" +#include "Log.h" +#include <ace/Stack_Trace.h> -#ifdef HAVE_ACE_STACK_TRACE_H // old versions ACE not have Stack_Trace.h but used at some oS for better compatibility -#define WPAssert( assertion ) { if (!(assertion)) { ACE_Stack_Trace st; fprintf( stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__,__FUNCTION__, #assertion, st.c_str()); assert( #assertion &&0 ); ((void(*)())NULL)();} } -#else -#define WPAssert( assertion ) { if (!(assertion)) { fprintf( stderr, "\n%s:%i in %s ASSERTION FAILED2:\n %s\n", __FILE__, __LINE__,__FUNCTION__, #assertion); assert( #assertion &&0 ); ((void(*)())NULL)();} } -#endif +#define WPAssert( assertion ) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError( "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__,__FUNCTION__, #assertion, st.c_str()); assert( #assertion &&0 ); ((void(*)())NULL)();} } #define WPError( assertion, errmsg ) if( ! (assertion) ) { sLog->outError( "%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); assert( false ); } #define WPWarning( assertion, errmsg ) if( ! (assertion) ) { sLog->outError( "\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); } - #define WPFatal( assertion, errmsg ) if( ! (assertion) ) { sLog->outError( "\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); assert( #assertion &&0 ); abort(); } #define ASSERT WPAssert #endif - |