errors 0.6.3
|
A base error class. More...
#include <errors/impl/base_error.hpp>
Public Member Functions | |
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. | |
virtual const error_ptr & | cause () const &noexcept=0 |
Get cause of this error, if any. | |
virtual error_ptr | cause () &&noexcept=0 |
Transfer the ownership of cause of this error, if any. | |
![]() | |
interface (const interface &)=delete | |
interface (interface &&)=delete | |
interface & | operator= (interface &&)=delete |
interface & | operator= (const interface &)=delete |
A base error class.
It implements the location method for all other builtin error types to derived from.
|
inline |
Constructor with source_location.
loc | The source location. |
|
inlineoverridevirtualnoexcept |
Get the source location of this error, if any.
This method returns the source location where this error is generated, if it is available.
Implements errors::error.