Exception
class Exception
Base class for Kernal exceptions.
constructor Exception()
constructor Exception(const char *format, ...)
Create an exception with a formatted message.
| Parameter | Description |
|---|---|
format |
The format string for the message. TYPE: |
... |
The arguments for the format string. |
constructor Exception(std::string message)
Create an exception with the given message.
| Parameter | Description |
|---|---|
message |
The message of the exception. TYPE: |
method Exception append_detail(const std::string &str)
Create a new exception with additional information appended to the message.
| Parameter | Description |
|---|---|
str |
The information to append. TYPE: |
| Returns | Description |
|---|---|
Exception |
The exception with the appended information. |
method Exception append_system_error(std::optional< int > code)
Create a new exception with additional information about a system error appended to the message.
| Parameter | Description |
|---|---|
code |
The error code to append. If not given, the current value of TYPE: |
| Returns | Description |
|---|---|
Exception |
The exception with the appended information. |
method const char *what()
Get the message of the exception.
| Returns | Description |
|---|---|
const char * |
The message of the exception. |
member std::string message
The message of the exception.