Blamite Game Engine - blam!  00272.10.26.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 
10 #define BR_FAILED(result) (result < 0)
11 #define BR_SUCCEEDED(result) (result >= 0)
12 
17 {
18  Log,
22 };
23 
28 {
29  OK = 0,
32 
41 };
42 
43 namespace Blam
44 {
49  namespace Diagnostics
50  {
54  namespace Errors
55  {
56  BLAM std::string GetErrorString(BlamResult result);
57  }
58  }
59 
67  namespace Error
68  {
75  BLAM void ShowLastErrorInfo(const char* function, BlamErrorDisplayType display_type);
76 
87  BLAM int ShowErrorDialog(std::string message, HRESULT hr, bool allow_continue, bool allow_safemode);
88 
97  BLAM std::string GetStringFromHResult(HRESULT hr);
98  }
99 }
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:37
Error
@ Error
Indicates an error that could cause engine instability.
Definition: logger.h:46
Error_Init_ImGui_OpenGL_Failed
@ Error_Init_ImGui_OpenGL_Failed
Definition: errors.h:34
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:35
Log
@ Log
Writes the error to the game log.
Definition: errors.h:18
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:33
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:36
Error_Init_OpenGL3_Failed_Generic
@ Error_Init_OpenGL3_Failed_Generic
Definition: errors.h:39
Error_Init_D3D11_Failed_Generic
@ Error_Init_D3D11_Failed_Generic
Definition: errors.h:38
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:40