SOIL C++
C++ Unified Device Interface
MQTT::Exception Class Reference

MQTT Publisher Exception. More...

#include <LocalException.h>

Inheritance diagram for MQTT::Exception:

Public Member Functions

 Exception (const char *message="", int code=0)
 Constructor. More...
 
 Exception (const std::exception &exc)
 Construcor from exception. More...
 
 ~Exception (void)
 Destructor. More...
 
const int code (void) const
 Result Code. More...
 

Detailed Description

Specific subclass of std::runtime_error to distinguish exceptions coming from the MQTT Publisher.

Definition at line 13 of file LocalException.h.

Constructor & Destructor Documentation

◆ Exception() [1/2]

MQTT::Exception::Exception ( const char *  message = "",
int  code = 0 
)

Constructor building an expection from a message and result code.

Parameters
[in]messageMessage to use for exeption description
[in]coderesult code to store.

Definition at line 5 of file LocalException.cpp.

◆ Exception() [2/2]

MQTT::Exception::Exception ( const std::exception &  exc)

Constructor to rethrow an exception that has occured from some other error within the context of the MQTT Publisher.

Parameters
[in]excExpcetion to replicate

Definition at line 9 of file LocalException.cpp.

◆ ~Exception()

MQTT::Exception::~Exception ( void  )

Standard destructor for the class

Definition at line 14 of file LocalException.cpp.

Member Function Documentation

◆ code()

const int MQTT::Exception::code ( void  ) const
inline

Get the result code that is stored internally in the exception.

Returns
result code.

Definition at line 55 of file LocalException.h.


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