Adapt error checking to current rabbitmq-c convention