Appearance
GenericException
cpp
#include <utlib/include/utl/types/Exception.h>cpp
template<typename T>
struct GenericExceptionDefined in utlib/include/utl/types/Exception.h:27
An exception that carries a payload and a message.
Public Attributes
| Return | Name | Description |
|---|---|---|
T | payload | Exception-specific payload. |
std::string | msg | Message returned by what(). |
payload
cpp
T payloadDefined in utlib/include/utl/types/Exception.h:29
Exception-specific payload.
msg
cpp
std::string msgDefined in utlib/include/utl/types/Exception.h:30
Message returned by what().
Public Methods
| Return | Name | Description |
|---|---|---|
GenericException inline explicit | Creates an exception with a payload and a message. | |
const char * | what const inline noexcept override | Returns the message. |
void | set_msg inline | Setters. |
void | set_payload inline | Replaces the payload. |
GenericException
inline explicit
cpp
inline explicit GenericException(T payload = {}, std::string msg = "")Defined in utlib/include/utl/types/Exception.h:33
Creates an exception with a payload and a message.
what
const inline noexcept override
cpp
inline const char * what() const noexcept overrideDefined in utlib/include/utl/types/Exception.h:37
Returns the message.
set_msg
inline
cpp
inline void set_msg(std::string value)Defined in utlib/include/utl/types/Exception.h:42
Setters.
set_payload
inline
cpp
inline void set_payload(T value)Defined in utlib/include/utl/types/Exception.h:44
Replaces the payload.