X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=odr%2Fodr.c;h=aaaec46904c56005d9ee20000f8b888fd84bd1ae;hb=29a22396d7d7b1219f5b83c35983c8fb1cd79e8f;hp=b772b6070b46aef836831f38c8a8c37cf74869f4;hpb=39fc6d5c771c134df959cdd44b2ad62d07b9576f;p=yaz-moved-to-github.git diff --git a/odr/odr.c b/odr/odr.c index b772b60..aaaec46 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.46 2003-10-16 10:37:06 adam Exp $ * */ #if HAVE_CONFIG_H @@ -44,11 +44,13 @@ char *odr_errmsg(int n) return odr_errlist[n]; } -void odr_perror(ODR o, char *message) +void odr_perror(ODR o, const 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");