errors 0.6.3
|
An error that has a message. More...
#include <errors/impl/runtime_error.hpp>
Public Member Functions | |
runtime_error (std::string msg, source_location loc) | |
Constructor with message and source_location. | |
const char * | what () const noexcept override |
Get error message. | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
![]() | |
interface (const interface &)=delete | |
interface (interface &&)=delete | |
interface & | operator= (interface &&)=delete |
interface & | operator= (const interface &)=delete |
Public Attributes | |
std::string | message |
The error message. | |
An error that has a message.
This class is used to create an error that has a message.
|
inline |
Constructor with message and source_location.
msg | The message. |
loc | The source location. |
|
inlineoverridevirtualnoexcept |
Get error message.
NULL
, but it can be an empty string.This method works just like std::exception::what
, you should print all the context which is useful for debugging in this method except for the source location.
Implements errors::error.