|
5.0.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. | |
| FCPPT_DETAIL_SYMBOL | exception (exception const &) |
| FCPPT_DETAIL_SYMBOL | exception (exception &&) noexcept |
| FCPPT_DETAIL_SYMBOL exception & | operator= (exception const &) |
| FCPPT_DETAIL_SYMBOL exception & | operator= (exception &&) noexcept |
| FCPPT_DETAIL_SYMBOL fcppt::string const & | string () const |
| Returns the error message. | |
| FCPPT_DETAIL_SYMBOL char const * | what () const noexcept override |
| Returns a generic error. | |
| FCPPT_DETAIL_SYMBOL | ~exception () noexcept override |
|
explicit |
Constructs an exception from a string.
| FCPPT_DETAIL_SYMBOL fcppt::exception::exception | ( | exception const & | ) |
|
noexcept |
|
overridenoexcept |
|
nodiscard |
Returns the error message.
Use this function to print the error message instead of what()
|
nodiscardoverridenoexcept |
Returns a generic error.
This function's purpose is to provide compatibility with std::exception. It returns nothing useful.