errors 0.6.3
Loading...
Searching...
No Matches
errors::impl::system_error Class Reference

An error that has a system error code. More...

#include <errors/impl/system_error.hpp>

Inheritance diagram for errors::impl::system_error:
Collaboration diagram for errors::impl::system_error:

Public Member Functions

 system_error (const std::string &message, int code, source_location location)
 Create a system error from a message and a code. The message will be pretended to the error message from strerror.
 
 system_error (int code, source_location location)
 Create a system error from a code. The message will be set to the error message from strerror.
 
 system_error (const std::string &message, source_location location)
 Create a system error from errno. The message will be pretended to the error message from strerror.
 
 system_error (source_location location)
 Create a system error from errno. The message will be set to the error message from strerror.
 
- Public Member Functions inherited from errors::impl::code_error< int >
 code_error (const std::string &message, int code, source_location location)
 Constructor with message, code and source_location.
 
const char * what () const noexcept override
 Get error message.
 
- Public Member Functions inherited from errors::impl::runtime_error
 runtime_error (std::string msg, source_location loc)
 Constructor with message and source_location.
 
const char * what () const noexcept override
 Get error message.
 
- Public Member Functions inherited from errors::impl::error_without_cause
const error_ptrcause () 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.
 
- Public Member Functions inherited from errors::impl::base_error
 base_error (source_location loc)
 Constructor with source_location.
 
std::optional< source_locationlocation () const noexcept override
 Get the source location of this error, if any.
 
- Public Member Functions inherited from errors::error
- Public Member Functions inherited from errors::detail::interface
 interface (const interface &)=delete
 
 interface (interface &&)=delete
 
interfaceoperator= (interface &&)=delete
 
interfaceoperator= (const interface &)=delete
 

Additional Inherited Members

- Public Attributes inherited from errors::impl::code_error< int >
int code
 The error code.
 
- Public Attributes inherited from errors::impl::runtime_error
std::string message
 The error message.
 

Detailed Description

An error that has a system error code.

Constructor & Destructor Documentation

◆ system_error() [1/4]

errors::impl::system_error::system_error ( const std::string & message,
int code,
source_location location )
inline

Create a system error from a message and a code. The message will be pretended to the error message from strerror.

Parameters
messageThe extra message.
codeThe error code.
locationThe source location.

◆ system_error() [2/4]

errors::impl::system_error::system_error ( int code,
source_location location )
inline

Create a system error from a code. The message will be set to the error message from strerror.

Parameters
codeThe error code.
locationThe source location.

◆ system_error() [3/4]

errors::impl::system_error::system_error ( const std::string & message,
source_location location )
inline

Create a system error from errno. The message will be pretended to the error message from strerror.

Parameters
messageThe extra message.
locationThe source location.

◆ system_error() [4/4]

errors::impl::system_error::system_error ( source_location location)
inline

Create a system error from errno. The message will be set to the error message from strerror.

Parameters
locationThe source location.

The documentation for this class was generated from the following file: