diff options
author | David Wragg <david@rabbitmq.com> | 2010-10-28 08:24:28 +0100 |
---|---|---|
committer | David Wragg <david@rabbitmq.com> | 2010-10-28 08:24:28 +0100 |
commit | 908c65026a76f761e87eb3c5c8d1a4241b272eeb (patch) | |
tree | cf3b10260ccfd1ef33d77117bc85bbb21b012eae | |
parent | 07921d07fe941ceb16364e5b610993a7096604c3 (diff) | |
download | rabbitmq-c-github-ask-908c65026a76f761e87eb3c5c8d1a4241b272eeb.tar.gz |
Add newlines on error messages in examples
-rw-r--r-- | examples/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/utils.c b/examples/utils.c index fcd349a..1837be8 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -74,7 +74,7 @@ void die_on_amqp_error(amqp_rpc_reply_t x, char const *context) { return; case AMQP_RESPONSE_NONE: - fprintf(stderr, "%s: missing RPC reply type!", context); + fprintf(stderr, "%s: missing RPC reply type!\n", context); break; case AMQP_RESPONSE_LIBRARY_EXCEPTION: @@ -85,7 +85,7 @@ void die_on_amqp_error(amqp_rpc_reply_t x, char const *context) { switch (x.reply.id) { case AMQP_CONNECTION_CLOSE_METHOD: { amqp_connection_close_t *m = (amqp_connection_close_t *) x.reply.decoded; - fprintf(stderr, "%s: server connection error %d, message: %.*s", + fprintf(stderr, "%s: server connection error %d, message: %.*s\n", context, m->reply_code, (int) m->reply_text.len, (char *) m->reply_text.bytes); @@ -93,14 +93,14 @@ void die_on_amqp_error(amqp_rpc_reply_t x, char const *context) { } case AMQP_CHANNEL_CLOSE_METHOD: { amqp_channel_close_t *m = (amqp_channel_close_t *) x.reply.decoded; - fprintf(stderr, "%s: server channel error %d, message: %.*s", + fprintf(stderr, "%s: server channel error %d, message: %.*s\n", context, m->reply_code, (int) m->reply_text.len, (char *) m->reply_text.bytes); break; } default: - fprintf(stderr, "%s: unknown server error, method id 0x%08X", context, x.reply.id); + fprintf(stderr, "%s: unknown server error, method id 0x%08X\n", context, x.reply.id); break; } break; |