11 #ifdef CPP_SDL2_DISABLE_EXCEPTIONS 18 #ifndef CPP_SDL2_DISABLE_EXCEPTIONS 36 const char*
what() const noexcept
override 42 what_ +=
" SDL error: ";
58 #else // Do not use exceptions 70 std::cerr <<
"Error in : " <<
function <<
"\n";
71 const auto error = SDL_GetError();
72 std::cerr <<
"Error : " <<
error <<
"\n";
std::string error_
storage for SDL_GetError() return string
std::string error()
Return the error message generated by SDL_GetError() at event object construction.
const char * what() const noexcept override
std::string function_
storage for function name string
Exception(std::string const &function)
Construct an exception object.
Define to deactivate exception support.
std::string what_
storage for the "what()" string. string is dynamically built when calling what() const ...
Define to deactivate exception support.