|
uint_t | Fatal (const char *pMessage,...) noexcept |
| A fatal error has occurred, print message, then exit.
|
|
void | Warning (const char *pMessage,...) noexcept |
| Store a non-fatal error message, then return or exit.
|
|
void | Message (const char *pMessage,...) noexcept |
| Print a message to the debugger output stream.
|
|
void | PrintString (const char *pMessage) noexcept |
| Print a string to a file or debugger.
|
|
void | PrintString (uint32_t uInput) noexcept |
| Print a uint32_t to the debug port.
|
|
void | PrintString (uint64_t uInput) noexcept |
| Print a uint64_t to the debug port.
|
|
void | PrintErrorMessage (uint_t uErrorCode) noexcept |
| Print the error message for an OS error code.
|
|
Group of functions to assist in debugging.
These thread safe functions will print messages to the debug console of the attached debugger and if a debugger is not available, the output will be logged into a text file on applicable platforms.
- See also
- Globals
A fatal error has occurred, print message, then exit.
If the input message pointer is not NULL, then print the message string using printf() rules.
This message, if any, will be output through Debug::Message() which either outputs it to a log file or a debugger's console (If a debugger is present and running).
- Note
- This will call Globals::Shutdown() with a default error code of 1. You must call Globals::SetErrorCode() to change the code to something else.
Secondly, this function won't return unless it was called while Globals::Shutdown() was already invoked, 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.
if (TestError) {
Debug::Fatal(
"Fatal error, file %s was not found.",pFileName);
return;
}
uint_t Fatal(const char *pMessage,...) noexcept
A fatal error has occurred, print message, then exit.
Definition brdebug.cpp:78
- Parameters
-
pMessage | Pointer to a string suitable for printf or NULL. |
- Returns
- 0 if this function returns. In most cases, this function never returns.
- See also
- Debug::Warning, Globals::GetExitFlag() and Globals::Shutdown()
void BURGER_API Burger::Debug::PrintString |
( |
const char * | pString | ) |
|
|
externnoexcept |
Print a string to a file or debugger.
Given a "C" string, stream the data to a text file, or if a debugger is attached, to the debugger console.
No parsing is done on the string, it's written as is.
- Parameters
-
pString | Pointer to a "C" string to print. |
void BURGER_ANSIAPI Burger::Debug::Warning |
( |
const char * | pMessage, |
|
|
| ... ) |
|
externnoexcept |
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 nullptr, do nothing to the error message buffer.
If Globals::SetErrorCode() was called with TRUE, this function will then treat this warning as an error and call Debug::Fatal(
const char *pFatalMsg,...) and exit.
if (TestError) {
return;
}
void Warning(const char *pMessage,...) noexcept
Store a non-fatal error message, then return or exit.
Definition brdebug.cpp:138
- Note
- The standard behavior is to store the text string and immediately return. Only if an explicit call to Globals::SetErrorCode() setting it TRUE will change the operation of this procedure.
- Parameters
-
pMessage | Pointer to a string suitable for printf or nullptr. |
- See also
- Debug::Fatal(const char *pFatalMsg,...)