From: Adam Dickmeiss Date: Thu, 19 Jun 2003 21:09:25 +0000 (+0000) Subject: More printing for odr_perror X-Git-Tag: YAZ.2.0.3~7 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=594abeca3faac015a41b74ea9ee00df8708cf97f;p=yaz-moved-to-github.git More printing for odr_perror --- diff --git a/odr/odr.c b/odr/odr.c index b772b60..da919a5 100644 --- a/odr/odr.c +++ b/odr/odr.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: odr.c,v 1.44 2003-05-24 19:20:14 adam Exp $ + * $Id: odr.c,v 1.45 2003-06-19 21:09:25 adam Exp $ * */ #if HAVE_CONFIG_H @@ -47,8 +47,10 @@ char *odr_errmsg(int n) void odr_perror(ODR o, char *message) { const char *e = odr_getelement(o); + int err, x; - fprintf(stderr, "%s: %s", message, odr_errlist[o->error]); + err = odr_geterrorx(o, &x); + fprintf(stderr, "%s: %s (code %d:%d)", message, odr_errlist[err], err, x); if (e && *e) fprintf (stderr, " element %s", e); fprintf(stderr, "\n");