Smart pointer to errors::error with some utility member functions.
More...
#include <errors/error_ptr.hpp>
|
| template<typename E > |
| bool | is () const |
| | Check if the error is caused by some kind of errors::error recursively.
|
| |
| template<typename E > |
| const E * | as () const |
| | Looking up error in causes.
|
| |
| template<typename E > |
| E * | as () |
| | Looking up error in causes.
|
| |
Smart pointer to errors::error with some utility member functions.
- Examples
- examples/basic-usage/src/main.cpp.
◆ as() [1/2]
template<typename E >
| E * errors::error_ptr::as |
( |
| ) |
|
|
inlinenodiscard |
Looking up error in causes.
- Template Parameters
-
| E | Type of error to looking for. |
- Returns
- A pointer to
E if this error is caused by an instance of error E, nullptr otherwise.
Examines the cause link list, looking for the first error which can be referenced by E.
◆ as() [2/2]
template<typename E >
| const E * errors::error_ptr::as |
( |
| ) |
const |
|
inlinenodiscard |
Looking up error in causes.
- Template Parameters
-
| E | Type of error to looking for. |
- Returns
- A pointer to
E if this error is caused by an instance of error E, nullptr otherwise.
Examines the cause link list, looking for the first error which can be referenced by E.
◆ is()
template<typename E >
| bool errors::error_ptr::is |
( |
| ) |
const |
|
inlinenodiscard |
Check if the error is caused by some kind of errors::error recursively.
- Template Parameters
-
- Returns
true if the error is caused by an instance of error E, false otherwise.
The documentation for this class was generated from the following file: