Exception
#include <tpau-cpp-kernal/Exception.h>
class Exception
Base class for Kernal exceptions.
constructor Exception
| Exception | ( | ); |
constructor Exception
Create an exception with a formatted message.
| Exception | ( | std::format_string< Args... > format, | |
| Args &&... args | ); |
| PARAMETER | DESCRIPTION |
|---|---|
format |
The format string for the message. |
args |
The arguments for the format string. |
constructor Exception
Create an exception with a message.
| Exception | ( | std::string_view message | ); |
| PARAMETER | DESCRIPTION |
|---|---|
message |
The message for the exception. |
method append_detail
Create a new exception with additional information appended to the message.
| Exception append_detail | ( | std::string_view str | ); |
| PARAMETER | DESCRIPTION |
|---|---|
str |
The information to append. |
| RETURNS | DESCRIPTION |
|---|---|
Exception |
The exception with the appended information. |
method append_system_error
Create a new exception with additional information about a system error appended to the message.
| Exception append_system_error | ( | std::optional< int > code | ); |
| PARAMETER | DESCRIPTION |
|---|---|
code |
The error code to append. If not given, the current value of |
| RETURNS | DESCRIPTION |
|---|---|
Exception |
The exception with the appended information. |
method emptyconst
Check if the exception's message is empty.
| bool empty | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
|
method whatconst
Get the message of the exception.
| const char * what | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
const char * |
The message of the exception. |
member message
The message of the exception.