errors 0.6.3
|
A base error class. More...
#include <errors/impl/error_with_cause.hpp>
Public Member Functions | |
error_with_cause (error_ptr &&cause, source_location loc) | |
Constructor with source_location. | |
const error_ptr & | cause () const &noexcept override |
Get cause of this error, if any. | |
error_ptr | cause () &&noexcept override |
Transfer the ownership of cause of this error, if any. | |
![]() | |
base_error (source_location loc) | |
Constructor with source_location. | |
std::optional< source_location > | location () const noexcept override |
Get the source location of this error, if any. | |
![]() | |
virtual const char * | what () const noexcept=0 |
Get error message. | |
![]() | |
interface (const interface &)=delete | |
interface (interface &&)=delete | |
interface & | operator= (interface &&)=delete |
interface & | operator= (const interface &)=delete |
A base error class.
It implements the cause method for all other builtin error types which have a cause to derived from.
|
inline |
Constructor with source_location.
loc | The source location. |
cause | The cause of the error. |
|
inlineoverridevirtualnoexcept |
Transfer the ownership of cause of this error, if any.
nullptr
if there is no causeThis method is used to transfer the ownership of the cause, use with caution.
Implements errors::error.
|
inlineoverridevirtualnoexcept |
Get cause of this error, if any.
nullptr
if there is no cause. Implements errors::error.