Paho C++  1.0
The Paho MQTT C++ Client Library
 All Classes Files Functions Variables Typedefs Friends
mqtt::exception Class Reference

Base mqtt::exception. More...

#include <exception.h>

Inheritance diagram for mqtt::exception:
mqtt::persistence_exception mqtt::security_exception

Public Member Functions

 exception (int code)
 Creates an MQTT exception. More...
 
 exception (int code, const string &msg)
 Creates an MQTT exception. More...
 
string get_message () const
 Returns the error message for this exception.
 
int get_reason_code () const
 Returns the reason code for this exception.
 
string to_string () const
 Gets a string representation of this exception. More...
 

Protected Attributes

int code_
 The error code from the C library.
 
string msg_
 The error message from the C library.
 

Detailed Description

Base mqtt::exception.

This wraps the error codes which originate from the underlying C library.

Constructor & Destructor Documentation

mqtt::exception::exception ( int  code)
inlineexplicit

Creates an MQTT exception.

Parameters
codeThe error code from the C library.
mqtt::exception::exception ( int  code,
const string &  msg 
)
inline

Creates an MQTT exception.

Parameters
codeThe error code from the C library.
msgThe text message for the error.

Member Function Documentation

string mqtt::exception::to_string ( ) const
inline

Gets a string representation of this exception.

Returns
A string representation of this exception.

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