Blamite Game Engine - Blam (Core)
error.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 namespace Blam
11 {
15  namespace Error
16  {
21  {
22  Log,
25  };
26 
33  BLAM void ShowLastErrorInfo(const char* function, ErrorDisplayType display_type);
34 
45  BLAM int ShowErrorDialog(std::string message, HRESULT hr, bool allow_continue, bool allow_safemode);
46 
54  BLAM std::string GetStringFromHResult(HRESULT hr);
55  }
56 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:17
Blam::Logger::Error
@ Error
Indicates an error that could cause engine instability.
Definition: logger.h:53
Blam::Error::ShowLastErrorInfo
BLAM void ShowLastErrorInfo(const char *function, ErrorDisplayType display_type)
Displays the last error information from Windows.
Definition: error.cpp:10
Blam::Error::Log
@ Log
Writes the error to the game log.
Definition: error.h:22
BLAM
#define BLAM
Definition: error.h:7
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: error.cpp:78
Blam::Error::Dialog
@ Dialog
Shows an engine Error dialog.
Definition: error.h:23
Blam::Error::GetStringFromHResult
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: error.cpp:48
Blam::Error::MessageBox
@ MessageBox
Shows a generic message box.
Definition: error.h:24
Blam::Error::ErrorDisplayType
ErrorDisplayType
Enumerator used to control how error info from Blam::Error::ShowLastErrorInfo is displayed.
Definition: error.h:20