BARE2D
BAREErrors.cpp File Reference
#include "BAREErrors.hpp"
#include <iostream>
#include <iomanip>
#include <csignal>
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include <cxxabi.h>
#include <typeinfo>
#include <memory>
#include <cstdlib>
#include "Logger.hpp"
+ Include dependency graph for BAREErrors.cpp:

Go to the source code of this file.

Namespaces

 BARE2D
 

Functions

std::string demangle (const char *mangled)
 PLEASE NOTE THAT IF MINGW BREAKS, THIS IS PROBABLY WHY. More...
 
void GLAPIENTRY MessageCallback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
 
std::string BARE2D::getErrString (BAREError err)
 Returns the string representing/explaining the error that occurred. More...
 
void BARE2D::throwFatalError (BAREError err, std::string message="")
 Throws an error (fatal). Also calls displayErrors and exits the program. More...
 
void BARE2D::throwError (BAREError err, std::string message="")
 Throws an error silently. Adds it to the pile. More...
 
void BARE2D::displayErrors ()
 Displays the latest thrown errors (really just all the thrown errors) in the console. More...
 
void BARE2D::initGLErrorCallback (GLErrorSeverity minSeverity=GLErrorSeverity::NOTIF)
 Initializes the GL Debug Message Callback function, and enables debug output straight from OpenGL. More...
 

Variables

GLErrorSeverity BARE2D::GLErrorMinSeverity = GLErrorSeverity::LOW
 
std::vector< BAREError > BARE2D::thrownErrors
 

Function Documentation

◆ demangle()

std::string demangle ( const char *  mangled)

PLEASE NOTE THAT IF MINGW BREAKS, THIS IS PROBABLY WHY.

De-mangles a typeid.name() return value

Parameters
mangledThe mangled typeid.name() return value
Returns
A demangled version of mangled.

Definition at line 16 of file BAREErrors.cpp.

◆ MessageCallback()

void GLAPIENTRY MessageCallback ( GLenum  source,
GLenum  type,
GLuint  id,
GLenum  severity,
GLsizei  length,
const GLchar *  message,
const void *  userParam 
)

Definition at line 22 of file BAREErrors.cpp.

References BARE2D::Logger::getInstance(), BARE2D::GLErrorMinSeverity, BARE2D::HIGH, BARE2D::Logger::log(), BARE2D::LOW, BARE2D::MED, BARE2D::NOTIF, and BARE2D::UNKNOWN.

Referenced by BARE2D::initGLErrorCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: