summaryrefslogtreecommitdiff
path: root/examples/example_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example_utils.c')
-rw-r--r--examples/example_utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/example_utils.c b/examples/example_utils.c
index 628572c..ae8f093 100644
--- a/examples/example_utils.c
+++ b/examples/example_utils.c
@@ -61,7 +61,7 @@
void die_on_error(int x, char const *context) {
if (x < 0) {
- fprintf(stderr, "%s: %s\n", context, strerror(-x));
+ fprintf(stderr, "%s: %s\n", context, amqp_error_string(-x));
exit(1);
}
}
@@ -76,8 +76,7 @@ void die_on_amqp_error(amqp_rpc_reply_t x, char const *context) {
break;
case AMQP_RESPONSE_LIBRARY_EXCEPTION:
- fprintf(stderr, "%s: %s\n", context,
- x.library_errno ? strerror(x.library_errno) : "(end-of-stream)");
+ fprintf(stderr, "%s: %s\n", context, amqp_error_string(x.library_error));
break;
case AMQP_RESPONSE_SERVER_EXCEPTION: