AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Errors.h File Reference
#include "StringFormat.h"

Go to the source code of this file.

Namespaces

namespace  Acore
 

Macros

#define WPAssert(cond, ...)   do { if (!(cond)) Acore::Assert(__FILE__, __LINE__, __FUNCTION__, GetDebugInfo(), #cond, ##__VA_ARGS__); } while(0)
 
#define WPAssert_NODEBUGINFO(cond)   do { if (!(cond)) Acore::Assert(__FILE__, __LINE__, __FUNCTION__, "", #cond); } while(0)
 
#define WPFatal(cond, ...)   do { if (!(cond)) Acore::Fatal(__FILE__, __LINE__, __FUNCTION__, #cond, ##__VA_ARGS__); } while(0)
 
#define WPError(cond, msg)   do { if (!(cond)) Acore::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
 
#define WPWarning(cond, msg)   do { if (!(cond)) Acore::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
 
#define WPAbort(...)   do { Acore::Abort(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0)
 
#define ASSERT   WPAssert
 
#define ASSERT_NODEBUGINFO   WPAssert_NODEBUGINFO
 
#define EXCEPTION_ASSERTION_FAILURE   0xC0000420L
 
#define ABORT   WPAbort
 
#define ASSERT_NOTNULL(pointer)   ASSERT_NOTNULL_IMPL(pointer, #pointer)
 

Functions

AC_COMMON_API void Acore::Assert (std::string_view file, uint32 line, std::string_view function, std::string_view debugInfo, std::string_view message, std::string_view fmtMessage={})
 
AC_COMMON_API void Acore::Fatal (std::string_view file, uint32 line, std::string_view function, std::string_view message, std::string_view fmtMessage={})
 
AC_COMMON_API void Acore::Error (std::string_view file, uint32 line, std::string_view function, std::string_view message)
 
AC_COMMON_API void Acore::Abort (std::string_view file, uint32 line, std::string_view function, std::string_view fmtMessage={})
 
template<typename... Args>
AC_COMMON_API void Acore::Assert (std::string_view file, uint32 line, std::string_view function, std::string_view debugInfo, std::string_view message, std::string_view fmt, Args &&... args)
 
template<typename... Args>
AC_COMMON_API void Acore::Fatal (std::string_view file, uint32 line, std::string_view function, std::string_view message, std::string_view fmt, Args &&... args)
 
template<typename... Args>
AC_COMMON_API void Acore::Abort (std::string_view file, uint32 line, std::string_view function, std::string_view fmt, Args &&... args)
 
AC_COMMON_API void Acore::Warning (std::string_view file, uint32 line, std::string_view function, std::string_view message)
 
AC_COMMON_API void Acore::AbortHandler (int sigval)
 
AC_COMMON_API std::string GetDebugInfo ()
 
template<typename T >
T * ASSERT_NOTNULL_IMPL (T *pointer, std::string_view expr)
 

Macro Definition Documentation

◆ ABORT

#define ABORT   WPAbort

◆ ASSERT

#define ASSERT   WPAssert

◆ ASSERT_NODEBUGINFO

#define ASSERT_NODEBUGINFO   WPAssert_NODEBUGINFO

◆ ASSERT_NOTNULL

#define ASSERT_NOTNULL (   pointer)    ASSERT_NOTNULL_IMPL(pointer, #pointer)

◆ EXCEPTION_ASSERTION_FAILURE

#define EXCEPTION_ASSERTION_FAILURE   0xC0000420L

◆ WPAbort

#define WPAbort (   ...)    do { Acore::Abort(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0)

◆ WPAssert

#define WPAssert (   cond,
  ... 
)    do { if (!(cond)) Acore::Assert(__FILE__, __LINE__, __FUNCTION__, GetDebugInfo(), #cond, ##__VA_ARGS__); } while(0)

◆ WPAssert_NODEBUGINFO

#define WPAssert_NODEBUGINFO (   cond)    do { if (!(cond)) Acore::Assert(__FILE__, __LINE__, __FUNCTION__, "", #cond); } while(0)

◆ WPError

#define WPError (   cond,
  msg 
)    do { if (!(cond)) Acore::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)

◆ WPFatal

#define WPFatal (   cond,
  ... 
)    do { if (!(cond)) Acore::Fatal(__FILE__, __LINE__, __FUNCTION__, #cond, ##__VA_ARGS__); } while(0)

◆ WPWarning

#define WPWarning (   cond,
  msg 
)    do { if (!(cond)) Acore::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)

Function Documentation

◆ ASSERT_NOTNULL_IMPL()

template<typename T >
T * ASSERT_NOTNULL_IMPL ( T *  pointer,
std::string_view  expr 
)
inline
80{
81 ASSERT(pointer, "{}", expr);
82 return pointer;
83}
#define ASSERT
Definition: Errors.h:68

References ASSERT.

◆ GetDebugInfo()

AC_COMMON_API std::string GetDebugInfo ( )
158{
159 return "";
160}