AnnErrorCode.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #define ANN_ERR_CRITIC 0xDEAD60D // Dead God
9  /*
10  Indicate that the execution environment of the engine hasn't been about to be initialized
11  - Check log file
12  */
13 #define ANN_ERR_MEMORY 0xFAA760D // Fa_t God
14  /*
15  Indicate that a memory error has been caused inside the engine
16  - Check if you haven't done something stupid pointers
17  - Please don't try to delete anything created by the engine, it's not you're problem
18  - Check log file for more information
19  */
20 #define ANN_ERR_RENDER 0x5ADE60D // Sa_d God
21  /*
22  Indicate an irrecoverable error with the renderer. Either during initialization or during rendering
23  - Check OVR runtime version
24  - Check hardware (HMD plugged, Graphics card compatible)
25  - Check other software (Graphics drivers)
26  - Check log file for more information
27  */
28 #define ANN_ERR_INFILE 0x12F1D31 // Infi-del
29  /*
30  Indicate that the engine is unable to understand an Annwvyn file you tried to load
31  - Check file path in your code
32  - Check file path referenced in the file
33  - Check syntax of the file
34  - Check log file at the moment of crash for more information
35  */
36 #define ANN_ERR_UNKOWN 0x200760D // No_t God
37  /*
38  See log. Something gone wrong and don't have a specific error code.
39  */
40 
41 #define ANN_ERR_NOTINIT 0x207760D // Not_ god
42  /*
43  See log. Something that should have been initialized beforehand isn't here.
44  If there isn't a log, you tried to use something relating ogre before Ogre initialization
45  */
46 
47 #define ANN_ERR_CANTHMD 0xB12D60D // BL(i)ND God
48  /*
49  Cannot select the wanted HMD
50  */
51 
52 #ifdef _WIN32
53 #include <Windows.h>
54 #else
55 using LPCWSTR = const wchar_t*;
56 #endif
57 
58 #include <string>
59 
60 inline void displayWin32ErrorMessage(const std::string& title, const std::string& content)
61 {
62 #ifdef _WIN32
63  MessageBoxA(nullptr, content.c_str(), title.c_str(), MB_ICONERROR);
64 #endif
65 }
void displayWin32ErrorMessage(const std::string &title, const std::string &content)
const wchar_t * LPCWSTR
T c_str(T... args)