AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Errors.cpp File Reference

This file contains definitions of functions used for reporting critical application errors. More...

#include "Errors.h"
#include "Duration.h"
#include <cstdio>
#include <cstdlib>
#include <thread>
#include <Windows.h>

Go to the source code of this file.

Macros

#define Crash(message)
 

Functions

std::string GetDebugInfo ()
 

Detailed Description

This file contains definitions of functions used for reporting critical application errors.

It is very important that (std::)abort is NEVER called in place of *((volatile int*)nullptr) = 0; Calling abort() on Windows does not invoke unhandled exception filters - a mechanism used by WheatyExceptionReport to log crashes. exit(1) calls here are for static analysis tools to indicate that calling functions defined in this file terminates the application.

Definition in file Errors.cpp.

Macro Definition Documentation

◆ Crash

#define Crash (   message)
Value:
ULONG_PTR execeptionArgs[] = { reinterpret_cast<ULONG_PTR>(strdup(message)), reinterpret_cast<ULONG_PTR>(_ReturnAddress()) }; \
RaiseException(EXCEPTION_ASSERTION_FAILURE, 0, 2, execeptionArgs);
#define EXCEPTION_ASSERTION_FAILURE
Definition Errors.h:73
38 { reinterpret_cast<ULONG_PTR>(strdup(message)), reinterpret_cast<ULONG_PTR>(_ReturnAddress()) }; \
39 RaiseException(EXCEPTION_ASSERTION_FAILURE, 0, 2, execeptionArgs);

Function Documentation

◆ GetDebugInfo()

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