rolmodl
C++ API for the Simple Directmedia Library 2 (SDL2)
Public Member Functions | List of all members
rolmodl::sdlexception Struct Reference

Exception type containing an error code and the last SDL error at the moment of creation. More...

#include <Base.hpp>

Inheritance diagram for rolmodl::sdlexception:
std::exception

Public Member Functions

 sdlexception (const int code) noexcept
 Initialize with the given error code and the last SDL error message. More...
 
 sdlexception () noexcept
 Initialize with the error code arbitrarily set to 0 if one isn't available and the last SDL error message. More...
 
int code () const noexcept
 Get the recorded error code.
 
const char * what () const noexcept override
 Get the recorded error message. More...
 
- Public Member Functions inherited from std::exception
exception (T... args)
 
operator= (T... args)
 
what (T... args)
 
~exception (T... args)
 

Detailed Description

Exception type containing an error code and the last SDL error at the moment of creation.

See also
https://wiki.libsdl.org/SDL_GetError

Definition at line 399 of file Base.hpp.

Constructor & Destructor Documentation

◆ sdlexception() [1/2]

rolmodl::sdlexception::sdlexception ( const int  code)
explicitnoexcept

Initialize with the given error code and the last SDL error message.

See also
https://wiki.libsdl.org/SDL_GetError

Definition at line 355 of file Base.cpp.

◆ sdlexception() [2/2]

rolmodl::sdlexception::sdlexception ( )
noexcept

Initialize with the error code arbitrarily set to 0 if one isn't available and the last SDL error message.

See also
https://wiki.libsdl.org/SDL_GetError

Definition at line 359 of file Base.cpp.

Member Function Documentation

◆ what()

const char * rolmodl::sdlexception::what ( ) const
overridenoexcept

Get the recorded error message.

See also
https://wiki.libsdl.org/SDL_GetError

Definition at line 366 of file Base.cpp.


The documentation for this struct was generated from the following files: