4.3.0
|
|
Freundlich's C++ toolkit |
The base class for all exceptions.
fcppt::exception is a wrapper around an exception that uses fcppt::string to store the error message. Note that you will have to use fcppt::exception::string to obtain the string. If you use what()
, which is only provided for compatibility with std::exception
, nothing useful will be returned. The reason behind this is that a string conversion itself can result in exceptions being thrown. That is why what()
does not try to convert from fcppt::string to std::string
.
Public Member Functions | |
FCPPT_DETAIL_SYMBOL | exception (fcppt::string &&what) |
Constructs an exception from a string. More... | |
FCPPT_DETAIL_SYMBOL | exception (exception const &) |
FCPPT_DETAIL_SYMBOL | exception (exception &&) noexcept |
fcppt::string const & | string () const |
Returns the error message. More... | |
FCPPT_DETAIL_SYMBOL char const * | what () const noexcept override |
Returns a generic error. More... | |
FCPPT_DETAIL_SYMBOL | ~exception () noexcept override |
Public Attributes | |
FCPPT_DETAIL_SYMBOL exception | operator =(exception const &) |
|
explicit |
Constructs an exception from a string.
FCPPT_DETAIL_SYMBOL fcppt::exception::exception | ( | exception const & | ) |
|
noexcept |
|
overridenoexcept |
fcppt::string const & fcppt::exception::string | ( | ) | const |
Returns the error message.
Use this function to print the error message instead of what()
|
overridenoexcept |
Returns a generic error.
This function's purpose is to provide compatibility with std::exception
. It returns nothing useful.