diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-05-25 23:44:24 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-06-13 15:38:11 -0700 |
commit | 3066080279e649390362a9d2390ea22e9c588fad (patch) | |
tree | 493d38a111cf2937f7fe2dfc3948301e1f103146 /librabbitmq/amqp.h | |
parent | 7bb64e49db0a183da67fab880803dbe4517e8560 (diff) | |
download | rabbitmq-c-github-ask-3066080279e649390362a9d2390ea22e9c588fad.tar.gz |
Expose public error-code interface
Publicly define the error codes returned from the various public API
functions. The error codes are defined in the amqp_status_enum and are
all negative in value to work with functions that return positive
values.
OS and SSL specific codes are no longer munged into the error code, as
it is unlikely for that information to be useful to library users.
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r-- | librabbitmq/amqp.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h index 1504def..f469dda 100644 --- a/librabbitmq/amqp.h +++ b/librabbitmq/amqp.h @@ -329,6 +329,22 @@ typedef struct amqp_connection_state_t_ *amqp_connection_state_t; typedef struct amqp_socket_t_ amqp_socket_t; +typedef enum amqp_status_enum_ +{ + AMQP_STATUS_OK = 0x0, + AMQP_STATUS_NO_MEMORY = -0x0001, + AMQP_STATUS_BAD_AMQP_DATA = -0x0002, + AMQP_STATUS_UNKNOWN_CLASS = -0x0003, + AMQP_STATUS_UNKNOWN_METHOD = -0x0004, + AMQP_STATUS_HOSTNAME_RESOLUTION_FAILED= -0x0005, + AMQP_STATUS_INCOMPATIBLE_AMQP_VERSION = -0x0006, + AMQP_STATUS_CONNECTION_CLOSED = -0x0007, + AMQP_STATUS_BAD_URL = -0x0008, + AMQP_STATUS_SOCKET_ERROR = -0x0009, + + AMQP_STATUS_SSL_ERROR = -0x0200 +} amqp_status_enum; + AMQP_PUBLIC_FUNCTION char const * AMQP_CALL amqp_version(void); |