![]() |
Blamite Game Engine - Blam (Core)
|
Namespace containing things relating to Error information and reporting. More...
Enumerations | |
enum | ErrorDisplayType { Log, Dialog, MessageBox } |
Enumerator used to control how error info from Blam::Error::ShowLastErrorInfo is displayed. More... | |
Functions | |
BLAM void | ShowLastErrorInfo (const char *function, ErrorDisplayType display_type) |
Displays the last error information from Windows. More... | |
BLAM int | ShowErrorDialog (std::string message, HRESULT hr, bool allow_continue, bool allow_safemode) |
Shows an Error dialog with the specified error details and result handle. More... | |
BLAM std::string | GetStringFromHResult (HRESULT hr) |
Converts a result handle to a string. More... | |
Namespace containing things relating to Error information and reporting.
Enumerator used to control how error info from Blam::Error::ShowLastErrorInfo is displayed.
Enumerator | |
---|---|
Log | Writes the error to the game log. |
Dialog | Shows an engine Error dialog. |
MessageBox | Shows a generic message box. |
std::string Blam::Error::GetStringFromHResult | ( | HRESULT | hr | ) |
Converts a result handle to a string.
hr | - The error code to convert. |
int Blam::Error::ShowErrorDialog | ( | std::string | message, |
HRESULT | hr, | ||
bool | allow_continue, | ||
bool | allow_safemode | ||
) |
Shows an Error dialog with the specified error details and result handle.
This can be used to show a more descriptive message along with an error code for debugging.
message | - The detailed message to show. |
hr | - The result handle that was in an error state. |
allow_continue | - Whether or not to allow the user to try to continue. |
allow_safemoed | - Whether or not to allow the user to try to continue in Safe Mode. |
void Blam::Error::ShowLastErrorInfo | ( | const char * | function, |
ErrorDisplayType | display_type | ||
) |
Displays the last error information from Windows.
function | - The function that was last called, ex: TEXT("LoadCursorW") |
display_type | - The error display type. See Blam::Error::ErrorDisplayType for details. |