SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Protected Attributes | List of all members
CSocketException Class Reference

#include <UDPSocket.h>

Inherits exception.

Public Member Functions

 CSocketException (const string &message, bool bSysMsg=false) throw ()
 
virtual ~CSocketException () throw ()
 
virtual const char * what () const throw ()
 

Protected Attributes

std::string m_sMsg
 

Detailed Description

Signals a problem with the execution of a socket call.

Definition at line 43 of file UDPSocket.h.

Constructor & Destructor Documentation

◆ CSocketException()

CSocketException::CSocketException ( const string &  message,
bool  bSysMsg = false 
)
throw (
)

Construct a SocketException with a explanatory message.

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

Definition at line 34 of file UDPSocket.cpp.

34  :m_sMsg(sMessage)
35 {
36  if (blSysMsg) {
37  m_sMsg.append(": ");
38  m_sMsg.append(strerror(errno));
39  }
40 }
std::string m_sMsg
Definition: UDPSocket.h:70

◆ ~CSocketException()

CSocketException::~CSocketException ( )
throw (
)
virtual

Destructor. Virtual to allow for subclassing.

Definition at line 42 of file UDPSocket.cpp.

43 {
44 
45 }

Member Function Documentation

◆ what()

virtual const char* CSocketException::what ( ) const
throw (
)
inlinevirtual

Returns a pointer to the (constant) error description.

Returns
A pointer to a const char*. The underlying memory is in possession of the Exception object. Callers must not attempt to free the memory.

Definition at line 65 of file UDPSocket.h.

65 { return m_sMsg.c_str(); }
std::string m_sMsg
Definition: UDPSocket.h:70

Member Data Documentation

◆ m_sMsg

std::string CSocketException::m_sMsg
protected

Error message.

Definition at line 70 of file UDPSocket.h.


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