aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Errors.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:51:44 -0700
committermaximius <none@none>2009-10-17 15:51:44 -0700
commite585187b248f48b3c6e9247b49fa07c6565d65e5 (patch)
tree637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /src/shared/Errors.h
parent26b5e033ffde3d161382fc9addbfa99738379641 (diff)
*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
Diffstat (limited to 'src/shared/Errors.h')
-rw-r--r--src/shared/Errors.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/Errors.h b/src/shared/Errors.h
index a7784fb7c14..bb17b94cbd0 100644
--- a/src/shared/Errors.h
+++ b/src/shared/Errors.h
@@ -17,17 +17,22 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#ifndef TRINITYCORE_ERRORS_H
#define TRINITYCORE_ERRORS_H
+
#include "Common.h"
+
#if PLATFORM != PLATFORM_WINDOWS
#ifndef HAVE_CONFIG_H
#include <config.h>
#endif
#endif
+
#ifdef HAVE_ACE_STACK_TRACE_H
#include "ace/Stack_Trace.h"
#endif
+
#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 ); } }
#else
@@ -35,7 +40,9 @@
#endif
#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