Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
wze::exception< error > Class Template Referencefinal

Generic exception. More...

#include <exception.hpp>

Inheritance diagram for wze::exception< error >:

Public Member Functions

 exception (std::string what)
 Explicit constructor.
 
 exception (exception< error > const &)=delete
 Deleted copy constructor.
 
 exception (exception< error > &&)=delete
 Deleted move constructor.
 
exceptionoperator= (exception< error > const &)=delete
 Deleted copy assignment operator.
 
exceptionoperator= (exception< error > &&)=delete
 Deleted move assignment operator.
 
char const * what () const noexcept final
 Gets the explanatory string.
 

Detailed Description

template<typename error>
class wze::exception< error >

Generic exception.

Template Parameters
errorError specialization.
See also
errors.hpp

Definition at line 41 of file exception.hpp.

Constructor & Destructor Documentation

◆ exception()

template<typename error >
wze::exception< error >::exception ( std::string what)
inlineexplicit

Explicit constructor.

Logs the explanatory string with LOG_LEVEL_ERROR.

Parameters
whatExplanatory string.
See also
log_level

Definition at line 49 of file exception.hpp.

49 : _what{std::move(what)} {
50 engine::log({this->what()}, {LOG_LEVEL_ERROR});
51 }
char const * what() const noexcept final
Gets the explanatory string.
Definition exception.hpp:77

Member Function Documentation

◆ what()

template<typename error >
char const * wze::exception< error >::what ( ) const
inlinenodiscardfinalnoexcept

Gets the explanatory string.

Returns
Explanatory string.

Definition at line 77 of file exception.hpp.

77 {
78 return _what.c_str();
79 }

The documentation for this class was generated from the following file: