Blamite Game Engine - blam!  00285.12.18.20.1411.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 
10 #define BR_FAILED(result) (result < 0)
11 #define BR_SUCCEEDED(result) (result >= 0)
12 
17 {
18  Log,
22 };
23 
28 {
29  OK = 0,
33 
42 
44 };
45 
46 namespace Blam
47 {
52  namespace Diagnostics
53  {
57  namespace Errors
58  {
59  BLAM std::string GetErrorString(BlamResult result);
60  }
61  }
62 
70  namespace Error
71  {
78  BLAM void ShowLastErrorInfo(const char* function, BlamErrorDisplayType display_type);
79 
90  BLAM int ShowErrorDialog(std::string message, HRESULT hr, bool allow_continue, bool allow_safemode);
91 
100  BLAM std::string GetStringFromHResult(HRESULT hr);
101  }
102 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:18
QtDialog
@ QtDialog
Shows a dialog created using Qt.
Definition: errors.h:21
Error_Reserved44
@ Error_Reserved44
Definition: errors.h:38
Error_Init_ImGui_OpenGL_Failed
@ Error_Init_ImGui_OpenGL_Failed
Definition: errors.h:35
BlamErrorDisplayType
BlamErrorDisplayType
Enumerator used to control how error info from Blam::Error::ShowLastErrorInfo is displayed.
Definition: errors.h:16
OK
@ OK
Definition: errors.h:29
Error_Generic
@ Error_Generic
Definition: errors.h:30
Win32Dialog
@ Win32Dialog
Shows an engine Error dialog.
Definition: errors.h:19
Error_Init_SDL2_D3D_Failed
@ Error_Init_SDL2_D3D_Failed
Definition: errors.h:36
Log
@ Log
Writes the error to the game log.
Definition: errors.h:18
BlamLogLevel::Error
@ Error
Indicates an error that could cause engine instability.
Error_ResourceNotFound
@ Error_ResourceNotFound
Definition: errors.h:32
Error_FileNotFound
@ Error_FileNotFound
Definition: errors.h:31
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
Error_Init_SDL2_OpenGL_Failed
@ Error_Init_SDL2_OpenGL_Failed
Definition: errors.h:34
Error_Config_FileNotLoaded
@ Error_Config_FileNotLoaded
Definition: errors.h:43
BLAM
#define BLAM
Definition: errors.h:7
Win32MessageBox
@ Win32MessageBox
Shows a generic message box.
Definition: errors.h:20
Blam::Error::ShowLastErrorInfo
BLAM void ShowLastErrorInfo(const char *function, BlamErrorDisplayType display_type)
Displays the last error information from Windows.
Definition: errors.cpp:12
Error_Init_ImGui_D3D_Failed
@ Error_Init_ImGui_D3D_Failed
Definition: errors.h:37
Error_Init_OpenGL3_Failed_Generic
@ Error_Init_OpenGL3_Failed_Generic
Definition: errors.h:40
Error_Init_D3D11_Failed_Generic
@ Error_Init_D3D11_Failed_Generic
Definition: errors.h:39
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:27
Error_Init_OpenGL3_CreateContext_Failed
@ Error_Init_OpenGL3_CreateContext_Failed
Definition: errors.h:41