[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] Xen-API C Bindings, version 0.4.1



On Wed, Aug 09, 2006 at 05:26:34PM +0100, Ewan Mellor wrote:

> >   Sorry, that's horrible, because you loose locality of the error.
> > Errors should be detected as soon as possible to be able to report 
> > them as accurately as possible.
> 
> If you want to detect them as soon as possible, just have if (session->ok)
> after every call.  It's no harder than if (return_value == NULL/-1/0/false).

I don't think the issue is whether it's possible to do so, but whether it's
natural. It's rather unnatural IMO to have this out-of-band error notification
in a C API. It's hard enough to get people to check return values when they
exist, never mind when they're implicit. (Yes, people should always strive to
get this right, but the perfect never happens, so it's really all about
minimising the error as much as possible...)

regards
john

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.