|
SlHelpers
|
Class for easier construction of std::runtime_error. More...
#include <Exception.h>
Classes | |
| struct | ThrowNow |
Public Member Functions | |
| RuntimeException (std::string_view str) | |
Construct new RuntimeException, having str as the initial exception string. | |
| template<typename T > | |
| RuntimeException & | operator<< (const T &msg) |
| Add more to the exception string. | |
| std::string | str () const |
| Return the stored exception string. | |
| auto | getRE () const |
| Create and return std::runtime_error. | |
| void | raise () const |
| Create and throw std::runtime_error. | |
| void | operator<< (const ThrowNow &) |
| Create and throw std::runtime_error. | |
Class for easier construction of std::runtime_error.
To be used as:
It is always necessary to use either SlHelpers::raise, or raise() to throw, or getRE() to obtain the exception.