simple-socket library 1.2.0
NET::SocketException Class Reference

Signals a problem with the execution of a socket call. More...

#include <SimpleSocket.h>

Public Member Functions

int errorCode () const noexcept
 Returns the glibc errno code of the current error.
 
 SocketException (const SocketException &)=default
 
 SocketException (std::string_view message, bool inclSysMsg=true)
 
const char * what () const noexcept
 Returns a C-string describing the cause of the current error.
 
 ~SocketException () noexcept
 Provided just to guarantee that no exceptions are thrown.
 

Detailed Description

Signals a problem with the execution of a socket call.

Definition at line 11 of file SimpleSocket.h.

Constructor & Destructor Documentation

◆ SocketException() [1/2]

SocketException::SocketException ( std::string_view message,
bool inclSysMsg = true )

Construct a SocketException with a explanatory message.

Parameters
messageexplanatory message
inclSysMsgtrue if system message from strerror(errno) should be postfixed to the user provided message

Definition at line 11 of file SimpleSocket.cpp.

◆ SocketException() [2/2]

NET::SocketException::SocketException ( const SocketException & )
default

◆ ~SocketException()

NET::SocketException::~SocketException ( )
inlinenoexcept

Provided just to guarantee that no exceptions are thrown.

Definition at line 25 of file SimpleSocket.h.

Member Function Documentation

◆ what()

const char * NET::SocketException::what ( ) const
inlinenoexcept

Returns a C-string describing the cause of the current error.

Definition at line 28 of file SimpleSocket.h.

◆ errorCode()

int NET::SocketException::errorCode ( ) const
inlinenoexcept

Returns the glibc errno code of the current error.

Definition at line 31 of file SimpleSocket.h.


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