From 908c65026a76f761e87eb3c5c8d1a4241b272eeb Mon Sep 17 00:00:00 2001 From: David Wragg Date: Thu, 28 Oct 2010 08:24:28 +0100 Subject: Add newlines on error messages in examples --- examples/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') 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; -- cgit v1.2.1