Initial commit. Not even a game yet :P
[cToan.git] / src / ErrorHandler.cpp
blobaceb2b17fc87323a427140d414e014b1a0bec49b
1 #include "ErrorHandler.hpp"
3 void
4 ErrorHandler::OutputError(ErrorType eType, std::string Error)
6 std::string FullError = "Oh shit, there was an error. *facepalm*\n"; // The preamble part.
7 switch (eType) {
8 case FATAL_CONSTRUCTOR_ERROR:
9 FullError += "SDL_GetError(): " + std::string(SDL_GetError()) + '\n';
10 FullError += "DEBUG: " + Error; // The error I report is less important than SDL_GetError().
11 FullError += "This error originated from a constructor, the program will abort by itself.\n";
12 std::cout << FullError;
13 break;
15 case NONFATAL_CONSTRUCTOR_ERROR:
16 break;
18 case FATAL_ERROR:
19 break;
21 case NONFATAL_ERROR:
22 break;
24 default: