Blamite Game Engine - blam!  00263.10.17.20.0001.blamite
The core library for the Blamite Game Engine.
errors.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <Windows.h>
5 
6 #ifndef BLAM
7 #define BLAM
8 #endif
9 
14 {
15  Log,
19 };
20 
25 {
26  OK = 0,
29 };
30 
31 namespace Blam
32 {
37  namespace Diagnostics
38  {
42  namespace Errors
43  {
44  BLAM std::string GetErrorString(BlamResult result);
45  }
46  }
47 
55  namespace Error
56  {
63  BLAM void ShowLastErrorInfo(const char* function, BlamErrorDisplayType display_type);
64 
75  BLAM int ShowErrorDialog(std::string message, HRESULT hr, bool allow_continue, bool allow_safemode);
76 
85  BLAM std::string GetStringFromHResult(HRESULT hr);
86  }
87 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:17
QtDialog
@ QtDialog
Shows a dialog created using Qt.
Definition: errors.h:18
Blam::Logger::Error
@ Error
Indicates an error that could cause engine instability.
Definition: logger.h:53
BlamErrorDisplayType
BlamErrorDisplayType
Enumerator used to control how error info from Blam::Error::ShowLastErrorInfo is displayed.
Definition: errors.h:13
OK
@ OK
Definition: errors.h:26
Error_Generic
@ Error_Generic
Definition: errors.h:27
Win32Dialog
@ Win32Dialog
Shows an engine Error dialog.
Definition: errors.h:16
Log
@ Log
Writes the error to the game log.
Definition: errors.h:15
Error_FileNotFound
@ Error_FileNotFound
Definition: errors.h:28
Blam::Error::ShowErrorDialog
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.
Definition: errors.cpp:96
BLAM
#define BLAM
Definition: errors.h:7
Win32MessageBox
@ Win32MessageBox
Shows a generic message box.
Definition: errors.h:17
Blam::Error::ShowLastErrorInfo
BLAM void ShowLastErrorInfo(const char *function, BlamErrorDisplayType display_type)
Displays the last error information from Windows.
Definition: errors.cpp:12
Blam::Diagnostics::Errors::GetErrorString
BLAM std::string GetErrorString(BlamResult result)
Definition: error_library.cpp:9
Blam::Error::GetStringFromHResult
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: errors.cpp:66
BlamResult
BlamResult
Enumerator containing any and all result codes used throughout the engine.
Definition: errors.h:24