rabbitmq-c error list

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

rabbitmq-c error list

Haster
Hi there!

I found that library rabbitmq-c can return a lot of different error - network related errors, OS errors and so on.

Is there some document that represent full list of errors that could be returned by library?
Reply | Threaded
Open this post in threaded view
|

Re: rabbitmq-c error list

alan.antonuk

On Tue, Jul 9, 2013 at 4:17 AM, Haster <[hidden email]> wrote:

Is there some document that represent full list of errors that could be
returned by library?

I'm currently working on the API documentation for this.  So the short answer is not yet.

That said there are places you can look that might help you:  

For functions that return an int (or amqp_rpc_reply_t with reply_type set to AMQP_RESPONSE_LIBRARY_EXCEPTION), the value will be of the set defined in amqp_status_enum.  

Given the different platforms that rabbitmq-c its hard to describe all the things that can go wrong without duplicating all the POSIX error codes.  In certain cases (e.g., when you get an AMQP_STATUS_SOCKET_ERROR) it might be useful to examine errno or WSAGetLastError() to see what went wrong. Generally speaking though, if the library gets a socket error it doesn't understand, it assumes that the network socket is dead.

As for errors from the broker, you can find a list on lines 55-72 of amqp_framing.h, usually when you get one of these you also get a string describing what went wrong in addition to the error code.

HTH
-Alan
--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-error-list-tp27924.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: rabbitmq-c error list

Haster
Alan , thanks for reply