WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Re: Error reporting capabilities for libxc

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: RE: [Xen-devel] Re: Error reporting capabilities for libxc
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 23 Oct 2006 23:15:21 +0100
Cc: Anthony Liguori <aliguori@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 23 Oct 2006 15:16:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <453D1554.8000202@xxxxxxxxxx> <20061023192753.GG25795@xxxxxxxxxx> <3AAA99889D105740BE010EB6D5A5A3B205073B@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20061023205730.GI25795@xxxxxxxxxx> <3AAA99889D105740BE010EB6D5A5A3B205073C@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20061023212157.GK25795@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acb26VhECjw7dnogRd2HiLSd5iEdNAABhTdQ
Thread-topic: [Xen-devel] Re: Error reporting capabilities for libxc
> > Would we be better off returning an error code and a set of
parameters,
> > requiring a call-back into the library to get the string?
> 
> That assumes that there is a static mapping between an error code
> and the error description, which there isn't. The error description
> can contain info about actual bits of metadata which were incorrect.
> For example when reporting an invalid ELF architecture, it can tell
> you exactly what ELF arch was found & what was expected.

That's precisely my point. The various bits of metadata can be
parameters passed back along with the error code. It's possible that
some callers will be able to do things with the metadata that are more
useful than just printing the string. I guess the error parameters could
be returned as a va_list. Many callers would just call back into the
library to get the appropriate error string.


Ian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel