|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [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
|
|
|
|
|