This class utilizes std::variant to hold one of the possible exception types.
More...
|
template<typename E>
requires (std::is_same_v<std::decay_t<E>, Exceptions> || ...) |
| | PossibleErrors (E &&e) |
| | ~PossibleErrors () |
| | PossibleErrors (const PossibleErrors &other) noexcept |
| | PossibleErrors (PossibleErrors &&other) noexcept |
| PossibleErrors & | operator= (const PossibleErrors &other)=delete |
| PossibleErrors & | operator= (PossibleErrors &&other) noexcept=delete |
| const std::exception * | GetRaw () const |
| | Returns a pointer to the exception held inside of the object.
|
| template<typename Visitor> |
| void | Visit (Visitor &&visitor) const & |
| | Visits the variant inside of the object with a callable.
|
| template<typename Visitor> |
| void | Visit (Visitor &&visitor) const && |
| | Visits the variant inside of the object with a callable.
|
| template<typename SpecificException, typename Func> |
| PossibleErrors & | On (Func &&handler) & |
| | Handles the exception with a callable if it is a specific exception type.
|
| template<typename SpecificException, typename Func> |
| PossibleErrors && | On (Func &&handler) && |
| | Handles the exception with a callable if it is a specific exception type.
|
| const char * | GetWhat () const |
| | Simply returns the formated error message held inside the execution object.
|
template<typename... Exceptions>
requires AllAreExceptions<Exceptions...>
class Cori::Core::PossibleErrors< Exceptions >
This class utilizes std::variant to hold one of the possible exception types.
- Template Parameters
-
| Exceptions | Possible exceptions. Should be either std::expected or derived from it. |
Definition at line 156 of file Error.hpp.