From 5482e20e5cbc4aca6fbf9ea3ecf674f5296701f2 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 5 Mar 2008 09:06:55 +0000 Subject: [PATCH] asynctest: print first startup errors --- test/asynctest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/asynctest.c b/test/asynctest.c index 21fc1ad..4217ce9 100644 --- a/test/asynctest.c +++ b/test/asynctest.c @@ -182,8 +182,10 @@ static void disconnect(DbConn *db, bool is_err, const char *reason, ...) /* some error happened */ static void conn_error(DbConn *db, const char *desc) { + static int ecount = 0; if (db->con) { - /* fixme show firt couple errors */ + if (ecount++ < 3) + printf("\r%s\n", PQerrorMessage(db->con)); disconnect(db, true, "%s: %s", desc, PQerrorMessage(db->con)); } else { printf("random error: %s\n", desc); -- 2.40.0