7#if !defined(ASYNC_MQTT_ERROR_HPP)
8#define ASYNC_MQTT_ERROR_HPP
14#include <boost/system/error_code.hpp>
15#include <boost/system/system_error.hpp>
16#include <boost/assert.hpp>
17#include <boost/operators.hpp>
34namespace sys = boost::system;
45namespace errc = sys::errc;
1092namespace boost::system {
1095struct is_error_code_enum<async_mqtt::mqtt_error> :
public std::true_type {};
1117struct is_error_code_enum<async_mqtt::
auth_reason_code> :
public std::true_type {};
1121#include <async_mqtt/impl/error.hpp>
sys::error_category const & get_auth_reason_code_category()
get gategory of auth_reason_code
constexpr char const * auth_reason_code_to_string(auth_reason_code v)
stringize auth_reason_code
auth_reason_code
auth reason code It is reported via AUTH packet
Definition error.hpp:1030
@ continue_authentication
Continue authentication (not an error)
@ re_authenticate
Re-authenticate (not an error)
sys::error_category const & get_connect_reason_code_category()
get gategory of connect_reason_code
connect_reason_code
connect reason code It is reported as CONNECT response via CONNACK packet
Definition error.hpp:356
constexpr char const * connect_reason_code_to_string(connect_reason_code v)
stringize connect_reason_code
@ quota_exceeded
Quota exceeded.
@ connection_rate_exceeded
Connection rate exceeded.
@ server_moved
Server moved.
@ success
Success (not an error)
@ server_busy
Server busy.
@ malformed_packet
Malformed Packet.
@ unsupported_protocol_version
Unsupported Protocol Version.
@ client_identifier_not_valid
Client Identifier not valid.
@ retain_not_supported
Retain not supported.
@ bad_authentication_method
Bad authentication method.
@ use_another_server
Use another server.
@ protocol_error
Protocol Error.
@ implementation_specific_error
Implementation specific error.
@ qos_not_supported
QoS not supported.
@ packet_too_large
Packet too large.
@ topic_name_invalid
Topic Name invalid.
@ unspecified_error
Unspecified error.
@ payload_format_invalid
Payload format invalid.
connect_return_code
connect return code See https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1....
Definition error.hpp:194
constexpr char const * connect_return_code_to_string(connect_return_code v)
stringize connect_return_code
sys::error_category const & get_connect_return_code_category()
get gategory of connect_return_code
@ accepted
Connection accepted (not an error)
@ identifier_rejected
The Client identifier is correct UTF-8 but not allowed by the Server.
@ not_authorized
The Client is not authorized to connect.
@ unacceptable_protocol_version
The Server does not support the level of the MQTT protocol requested by the Client.
@ bad_user_name_or_password
The data in the user name or password is malformed.
@ server_unavailable
The Network Connection has been made but the MQTT service is unavailable.
disconnect_reason_code
disconnect reason code It is reported via DISCONNECT
Definition error.hpp:451
constexpr char const * disconnect_reason_code_to_string(disconnect_reason_code v)
stringize disconnect_reason_code
sys::error_category const & get_disconnect_reason_code_category()
get gategory of disconnect_reason_code
@ message_rate_too_high
Message rate too high.
@ subscription_identifiers_not_supported
Subscription Identifiers not supported.
@ administrative_action
Administrative action.
@ maximum_connect_time
Maximum connect time.
@ normal_disconnection
Normal disconnection (not an error)
@ wildcard_subscriptions_not_supported
Wildcard Subscriptions not supported.
@ topic_filter_invalid
Topic Filter invalid.
@ session_taken_over
Session taken over.
@ shared_subscriptions_not_supported
Shared Subscriptions not supported.
@ server_shutting_down
Server shutting down.
@ receive_maximum_exceeded
Receive Maximum exceeded.
@ disconnect_with_will_message
Disconnect with Will Message (not an error)
@ topic_alias_invalid
Topic Alias invalid.
@ keep_alive_timeout
Keep Alive timeout.
sys::error_code error_code
sys is a namespace alias of boost::sytem.
Definition error.hpp:56
sys::system_error system_error
system_error is a type alias of boost::sytem::system_error.
Definition error.hpp:67
sys::error_category const & get_mqtt_error_category()
get gategory of mqtt_error
error_code make_error_code(mqtt_error v)
make error code
mqtt_error
general error code
Definition error.hpp:114
constexpr char const * mqtt_error_to_string(mqtt_error v)
stringize mqtt_error
std::ostream & operator<<(std::ostream &o, mqtt_error v)
output to the stream
@ packet_not_allowed_to_store
Packet is not allowd to be stored.
@ partial_error_detected
Some entries have error on suback/unsuback (not an error)
@ all_error_detected
All entries have error on suback/unsuback.
@ packet_identifier_conflict
Packet Identifier conflict.
@ packet_not_regulated
Packet is not regulated.
@ packet_identifier_fully_used
Packet Identifier fully used.
@ packet_not_allowed_to_send
Packet is not allowd to be sent.
puback_reason_code
puback reason code It is reported as PUBLISH (QoS1) response via PUBACK packet
Definition error.hpp:718
sys::error_category const & get_puback_reason_code_category()
get gategory of puback_reason_code
constexpr char const * puback_reason_code_to_string(puback_reason_code v)
stringize puback_reason_code
@ no_matching_subscribers
No matching subscribers (not an error)
constexpr char const * pubcomp_reason_code_to_string(pubcomp_reason_code v)
stringize pubcomp_reason_code
pubcomp_reason_code
pubcomp reason code It is reported as PUBREL response via PUBCOMP packet
Definition error.hpp:956
sys::error_category const & get_pubcomp_reason_code_category()
get gategory of pubcomp_reason_code
constexpr char const * pubrec_reason_code_to_string(pubrec_reason_code v)
stringize pubrec_reason_code
sys::error_category const & get_pubrec_reason_code_category()
get gategory of pubrec_reason_code
pubrec_reason_code
pubrec reason code It is reported as PUBLISH (QoS2) response via PUBREC packet
Definition error.hpp:800
constexpr char const * pubrel_reason_code_to_string(pubrel_reason_code v)
stringize pubrel_reason_code
sys::error_category const & get_pubrel_reason_code_category()
get gategory of pubrel_reason_code
pubrel_reason_code
pubrel reason code It is reported as PUBREC response via PUBREL packet
Definition error.hpp:881
@ packet_identifier_not_found
Packet Identifier not found.
sys::error_category const & get_suback_reason_code_category()
get gategory of suback_reason_code
suback_reason_code
suback reason code It is reported as SUBSCRIBE response via SUBNACK packet
Definition error.hpp:553
constexpr char const * suback_reason_code_to_string(suback_reason_code v)
stringize suback_reason_code
@ granted_qos_2
Granted QoS 2 (not an error)
@ granted_qos_0
Granted QoS 0 (not an error)
@ packet_identifier_in_use
Packet Identifier in use.
@ granted_qos_1
Granted QoS 1 (not an error)
constexpr char const * suback_return_code_to_string(suback_return_code v)
stringize suback_return_code
suback_return_code
MQTT suback_return_code.
Definition error.hpp:274
sys::error_category const & get_suback_return_code_category()
get gategory of suback_return_code
@ success_maximum_qos_1
Success with QoS1 (not an error)
@ success_maximum_qos_2
Success with QoS2 (not an error)
@ success_maximum_qos_0
Success with QoS0 (not an error)
unsuback_reason_code
unsuback reason code It is reported as UNSUBSCRIBE response via UNSUBNACK packet
Definition error.hpp:638
sys::error_category const & get_unsuback_reason_code_category()
get gategory of unsuback_reason_code
constexpr char const * unsuback_reason_code_to_string(unsuback_reason_code v)
stringize unsuback_reason_code
@ no_subscription_existed
No subscription existed (not an error)