#include <brdebug.h>

Classes | |
| struct | BRDebugLocals_t |
Public Types | |
| enum | DebugTrace_e { TRACE_MEMORYLEAKS = 1, TRACE_REZLOAD = 2, TRACE_FILELOAD = 4, TRACE_WARNINGS = 8, TRACE_NETWORK = 0x10, TRACE_THEWORKS = 0x1F } |
Static Public Member Functions | |
| static Word BURGER_ANSIAPI | Fatal (const char *pFatalMsg,...) |
| A fatal error has occured, print message, then exit. | |
| static void BURGER_ANSIAPI | NonFatal (const char *pMessage,...) |
| Store a non-fatal error message, then return or exit. | |
| static void BURGER_ANSIAPI | SetErrorMsg (const char *pMessage,...) |
| Update the current error message. | |
| static BURGER_INLINE const char * | GetErrorMsg (void) |
| Get the pointer to the global error message buffer. | |
| static BURGER_INLINE Word | GetTraceFlag (void) |
| Get the current debug tracing flag. | |
| static BURGER_INLINE void | SetTraceFlag (Word uNewFlag) |
| Set the current debug tracing flag. | |
| static BURGER_INLINE Word | GetErrorBombFlag (void) |
| Get the current flag to treat warnings as fatal errors. | |
| static BURGER_INLINE void | SetErrorBombFlag (Word uNewFlag) |
| Set the current flag to treat warnings as fatal errors. | |
Static Private Attributes | |
| static BRDebugLocals_t | g_BRDebug |
| Word BURGER_ANSIAPI BRDebug::Fatal | ( | const char * | pFatalMsg, | |
| ... | ||||
| ) | [static] |
A fatal error has occured, print message, then exit.
If the input message pointer is not NULL, then print the message string into the global error string buffer using printf() rules.
This message, if any, will be output through BRDebug::DebugXMessage() which either outputs it to a log file or a debugger's console (If a debugger is present and running).
if (TestError) { BRDebug::Fatal("Fatal error, file %s was not found.",pFileName); return; }
Secondly, this function won't return unless it was called while BRSystem::Shutdown(), then this function CAN return, so you must add a return statement after calling this function in the case that there is a recursion error in progress.
| pFatalMsg | Pointer to a string suitable for printf or NULL. |
| BRDebug::GetErrorBombFlag | ( | void | ) | [inline, static] |
Get the current flag to treat warnings as fatal errors.
When BRDebug::NonFatal is called, it will test the state of this boolean flag and if TRUE, it will abort code execution and exit immediately.
| BRDebug::GetErrorMsg | ( | void | ) | [inline, static] |
Get the pointer to the global error message buffer.
Calls to many functions that fail will update this buffer to return verbose output.
| BRDebug::GetTraceFlag | ( | void | ) | [inline, static] |
Get the current debug tracing flag.
Several subsystems perform diagnostic logging and this flag enables and/or disables that feature.
| void BURGER_ANSIAPI BRDebug::NonFatal | ( | const char * | pMessage, | |
| ... | ||||
| ) | [static] |
Store a non-fatal error message, then return or exit.
If the input message pointer is not NULL, then store the message string into the global error string buffer using printf() rules. If it's NULL, do nothing to the error message buffer.
If BRSystem::SetErrorCode() was called with TRUE, this function will then treat this warning as an error and call BRDebug::Fatal(const char *pFatalMsg,...) and exit.
if (TestError) { BRDebug::NonFatal("Warning, file %s was not found.",pFileName); return; }
| pMessage | Pointer to a string suitable for printf or NULL. |
| BRDebug::SetErrorBombFlag | ( | Word | uNewFlag | ) | [inline, static] |
Set the current flag to treat warnings as fatal errors.
When BRDebug::NonFatal is called, it will test the state of this boolean flag and if TRUE, it will abort code execution and exit immediately.
| uNewFlag | If non-zero, it will set the flag, zero will clear it. |
| void BURGER_ANSIAPI BRDebug::SetErrorMsg | ( | const char * | pMessage, | |
| ... | ||||
| ) | [static] |
Update the current error message.
If the input message pointer is not NULL, then store the message string into the global error string buffer using printf() rules. If it's NULL, set the string to "".
| pMessage | Pointer to a string suitable for printf or NULL. |
| BRDebug::SetTraceFlag | ( | Word | uNewFlag | ) | [inline, static] |
Set the current debug tracing flag.
Several subsystems perform diagnostic logging and this flag enables and/or disables that feature.
| uNewFlag | The trace flag mask. Generate it with BRDebug::DebugTrace_e enumerations. |
BRDebug::BRDebugLocals_t BRDebug::g_BRDebug [static, private] |
1.7.1