[libvirt] [PATCH 02/33] Make all brXXX APIs raise errors, instead of returning errnos

Laine Stump laine at laine.org
Wed Nov 9 16:20:12 UTC 2011


On 11/03/2011 01:29 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange"<berrange at redhat.com>
>
> Currently every caller of the brXXX APIs has to store the returned
> errno value and then raise an error message. This results in
> inconsistent error messages across drivers, additional burden on
> the callers and makes the error reporting inaccurate since it is
> hard to distinguish different scenarios from 1 errno value.


While making the message more exact, it could also make it more 
difficult to determine the context of the error. Sometimes it's useful 
to have both (a drop-down list with a stack trace embedded into each 
error message would be so nice to have sometimes :-)




More information about the libvir-list mailing list