A custom exception class that extends std::exception to handle critical errors.
More...
#include <CriticalError.hpp>
|
| CriticalError (const std::string_view &message, std::exception_ptr inner_exception=nullptr) |
| Constructs a CriticalError with a specified message and an optional inner exception.
|
|
const char * | what () const noexcept override |
| Returns the error message.
|
|
std::exception_ptr | getInnerException () const |
| Retrieves the inner exception.
|
|
A custom exception class that extends std::exception to handle critical errors.
This class provides a way to encapsulate critical error messages and optionally store an inner exception for more detailed error information.
◆ CriticalError()
CriticalError::CriticalError |
( |
const std::string_view & |
message, |
|
|
std::exception_ptr |
inner_exception = nullptr |
|
) |
| |
|
inlineexplicit |
Constructs a CriticalError with a specified message and an optional inner exception.
- Parameters
-
message | A string_view containing the error message. |
inner_exception | An optional std::exception_ptr to an inner exception. |
◆ getInnerException()
std::exception_ptr CriticalError::getInnerException |
( |
| ) |
const |
|
inline |
Retrieves the inner exception.
- Returns
- A std::exception_ptr to the inner exception, or nullptr if no inner exception is set.
◆ what()
const char * CriticalError::what |
( |
| ) |
const |
|
inlineoverridenoexcept |
Returns the error message.
- Returns
- A C-style string containing the error message.
The documentation for this class was generated from the following file: