19 #ifndef TRINITYCORE_ERRORS_H
20 #define TRINITYCORE_ERRORS_H
41 #if COMPILER == COMPILER_MICROSOFT
42 #define ASSERT_BEGIN __pragma(warning(push)) __pragma(warning(disable: 4127))
43 #define ASSERT_END __pragma(warning(pop))
49 #define WPAssert(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond, ##__VA_ARGS__); } while(0) ASSERT_END
50 #define WPFatal(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END
51 #define WPError(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
52 #define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
53 #define WPAbort() ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END
55 #define ASSERT WPAssert
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
T * ASSERT_NOTNULL(T *pointer)
Definition: Errors.h:58
void Assert(char const *file, int line, char const *function, char const *message)
Definition: Errors.cpp:39
void Abort(char const *file, int line, char const *function)
Definition: Errors.cpp:91
#define ATTR_NORETURN
COREDEBUG.
Definition: Define.h:88
#define ATTR_PRINTF(F, V)
Definition: Define.h:89
void Fatal(char const *file, int line, char const *function, char const *message,...)
Definition: Errors.cpp:62
void AbortHandler(int)
Definition: Errors.cpp:99
#define TC_COMMON_API
Definition: Define.h:116
#define DECLSPEC_NORETURN
Definition: Define.h:69
#define ASSERT
Definition: Errors.h:55
#define const
Definition: zconf.h:217
void Warning(char const *file, int line, char const *function, char const *message)
Definition: Errors.cpp:85
void Error(char const *file, int line, char const *function, char const *message)
Definition: Errors.cpp:77