sockpp
Modern C++ socket library wrapper
Public Member Functions | Static Public Member Functions | List of all members
sockpp::sys_error Class Reference

System error. More...

#include <exception.h>

Inheritance diagram for sockpp::sys_error:

Public Member Functions

 sys_error ()
 Creates an error using the current system 'errno' value.
 
 sys_error (int err)
 Constructs an error with the specified system errno. More...
 
int error () const
 Get the error number. More...
 

Static Public Member Functions

static std::string error_str (int err)
 Gets a string describing the specified error. More...
 

Detailed Description

System error.

These are errors that are resulted from system socket calls. The error codes are platform 'errno' values (or similar), and the messages are typically derived from the system.

Constructor & Destructor Documentation

◆ sys_error()

sockpp::sys_error::sys_error ( int  err)
explicit

Constructs an error with the specified system errno.

Parameters
errThe error number. This is the system errno value.

Member Function Documentation

◆ error()

int sockpp::sys_error::error ( ) const
inline

Get the error number.

Returns
The system error number.

◆ error_str()

static std::string sockpp::sys_error::error_str ( int  err)
static

Gets a string describing the specified error.

This is typically the returned message from the system strerror().

Parameters
errThe system error number.
Returns
A string describing the specified error.

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