From 589f06710187713796f220f0a874b4447aaa6829 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Tue, 13 Dec 2011 13:55:06 +0100 Subject: Core/DBLayer: Terminate process if table/database structure is not compatible with the core. This will significantly reduce the amount of PEBCAK help and support threads on our forums. Also added a 10 second window to WPFatal for users who never heard of command line before to read the error prior to process termination. --- src/server/shared/Debugging/Errors.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/shared/Debugging') diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index cfa1452864f..921363d6dc5 100755 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -22,11 +22,12 @@ #include "Common.h" #include "Log.h" #include +#include #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 WPFatal( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); ACE_OS::sleep(10); assert( #assertion &&0 ); abort(); } #define ASSERT WPAssert #endif -- cgit v1.2.3