TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Errors.h File Reference
#include "Define.h"
+ Include dependency graph for Errors.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Trinity
 

Macros

#define ASSERT_BEGIN   __pragma(warning(push)) __pragma(warning(disable: 4127))
 
#define ASSERT_END   __pragma(warning(pop))
 
#define WPAssert(cond,...)   ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond, ##__VA_ARGS__); } while(0) ASSERT_END
 
#define WPFatal(cond,...)   ASSERT_BEGIN do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END
 
#define WPError(cond, msg)   ASSERT_BEGIN do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
 
#define WPWarning(cond, msg)   ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
 
#define WPAbort()   ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END
 
#define ASSERT   WPAssert
 
#define ABORT   WPAbort
 

Functions

void Trinity::Assert (char const *file, int line, char const *function, char const *message)
 
void Trinity::Assert (char const *file, int line, char const *function, char const *message, char const *format,...)
 
void Trinity::Fatal (char const *file, int line, char const *function, char const *message,...)
 
void Trinity::Error (char const *file, int line, char const *function, char const *message)
 
void Trinity::Abort (char const *file, int line, char const *function)
 
void Trinity::Warning (char const *file, int line, char const *function, char const *message)
 
void Trinity::AbortHandler (int)
 
template<typename T >
T * ASSERT_NOTNULL (T *pointer)
 

Macro Definition Documentation

#define ABORT   WPAbort
#define ASSERT   WPAssert
#define ASSERT_BEGIN   __pragma(warning(push)) __pragma(warning(disable: 4127))
#define ASSERT_END   __pragma(warning(pop))
#define WPAbort ( )    ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END
#define WPAssert (   cond,
  ... 
)    ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond, ##__VA_ARGS__); } while(0) ASSERT_END
#define WPError (   cond,
  msg 
)    ASSERT_BEGIN do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END
#define WPFatal (   cond,
  ... 
)    ASSERT_BEGIN do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END
#define WPWarning (   cond,
  msg 
)    ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END

Function Documentation

template<typename T >
T* ASSERT_NOTNULL ( T *  pointer)
inline
59 {
60  ASSERT(pointer);
61  return pointer;
62 }
#define ASSERT
Definition: Errors.h:55

+ Here is the caller graph for this function: