|
errors 0.6.3
|
A function like class to wrap an error. More...
#include <errors/wrap.hpp>


Public Member Functions | |
| wrap (std::string message, error_ptr &&cause, source_location location=source_location::current()) | |
| Wraps an error with an optional message. | |
| wrap (error_ptr &&cause, source_location location=source_location::current()) | |
| Wraps an error. | |
Public Member Functions inherited from errors::error_ptr | |
| 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. | |
|
inline |
Wraps an error with an optional message.
This class is used to quickly wrap an error with an optional message. It is equivalent to errors::make<wrap_error>::with(...).