libwreport 3.38
wreport::error_system Class Reference

Report a system error message. More...

#include <error.h>

Inheritance diagram for wreport::error_system:
wreport::errors::StringBase< WR_ERR_SYSTEM > wreport::error

Public Member Functions

 error_system (const std::string &msg)
 Create an exception taking further information from errno.
 
 error_system (const std::string &msg, int errno_val)
 Create an exception taking further information from an explicit errno value.
 
- Public Member Functions inherited from wreport::errors::StringBase< WR_ERR_SYSTEM >
 StringBase (const std::string &msg) noexcept
 
ErrorCode code () const noexcept override
 Exception-specific error code.
 
const char * what () const noexcept override
 Error message.
 

Static Public Member Functions

static void throwf (const char *fmt,...) WREPORT_THROWF_ATTRS(1
 Throw the exception, building the message printf-style.
 
- Static Public Member Functions inherited from wreport::error
static const char * strerror (ErrorCode code)
 String description for an error code.
 

Additional Inherited Members

- Data Fields inherited from wreport::errors::StringBase< WR_ERR_SYSTEM >
std::string msg
 error message returned by what()
 

Detailed Description

Report a system error message.

The message description will be looked up using the current value of errno.

Constructor & Destructor Documentation

◆ error_system() [1/2]

wreport::error_system::error_system ( const std::string & msg)

Create an exception taking further information from errno.

Parameters
msgerror message

References wreport::errors::StringBase< WR_ERR_SYSTEM >::msg.

◆ error_system() [2/2]

wreport::error_system::error_system ( const std::string & msg,
int errno_val )

Create an exception taking further information from an explicit errno value.

Parameters
msgerror message
errno_valexplicit errno value

References wreport::errors::StringBase< WR_ERR_SYSTEM >::msg.


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