![]() |
PahoMqttCpp
MQTT C++ Client for POSIX and Windows
|
#include <exception.h>
Public Member Functions | |
| exception (int rc) | |
| exception (int rc, ReasonCode reasonCode) | |
| exception (int rc, const string &msg) | |
| exception (int rc, ReasonCode reasonCode, const string &msg) | |
| int | get_return_code () const |
| string | get_error_str () const |
| int | get_reason_code () const |
| string | get_reason_code_str () const |
| string | get_message () const |
| string | to_string () const |
Static Public Member Functions | |
| static string | error_str (int rc) |
| static string | reason_code_str (int reasonCode) |
| static string | printable_error (int rc, ReasonCode reasonCode=ReasonCode::SUCCESS, const string &msg=string()) |
Static Protected Member Functions | |
| static ReasonCode | reason_code (int rc, ReasonCode reasonCode) |
Protected Attributes | |
| int | rc_ |
| ReasonCode | reasonCode_ |
| string | msg_ |
Base mqtt::exception. This wraps the error codes which originate from the underlying C library.
|
inlineexplicit |
Creates an MQTT exception.
| rc | The error return code from the C library. |
|
inlineexplicit |
Creates an MQTT exception.
| rc | The error return code from the C library. |
| reasonCode | The reason code from the server response. |
|
inline |
Creates an MQTT exception.
| rc | The error return code from the C library. |
| msg | The text message for the error. |
|
inline |
Creates an MQTT exception.
| rc | The error return code from the C library. |
| reasonCode | The reason code from the server |
| msg | The text message for the error. |
|
inlinestaticprotected |
See if the return code is actually a reason code error value
|
inlinestatic |
Gets an error message from an error code.
| rc | The error code from the C lib |
|
inlinestatic |
Gets a string describing the MQTT v5 reason code.
| reasonCode | The MQTT v5 reason code. |
|
inlinestatic |
Gets a detailed error message for an error code.
| rc | The error code from the C lib |
| reasonCode | The MQTT v5 reason code |
| msg | An optional additional message. If none is provided, the error_str message is used. |
|
inline |
Returns the return code for this exception.
|
inline |
Gets a string of the error code.
|
inline |
Returns the reason code for this exception. For MQTT v3 connections, this is actually the return code.
|
inline |
Gets a string for the reason code.
|
inline |
Returns the error message for this exception.
|
inline |
Gets a string representation of this exception.
|
protected |
The error return code from the C library
|
protected |
The reason code from the server
|
protected |
The error message from the C library