xen-api
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
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, (continued)
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Ewan Mellor
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Daniel P. Berrange
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Ewan Mellor
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Daniel Veillard
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Ewan Mellor
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Daniel Veillard
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Daniel P. Berrange
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1,
John Levon <=
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Ewan Mellor
- Re: [Xen-API] Xen-API C Bindings, version 0.4.1, Gareth S Bestor
- [Xen-API] Re: Xen-API C Bindings, version 0.4.1, Sean Dague
- [Xen-API] Re: Xen-API C Bindings, version 0.4.1, Ewan Mellor
[Xen-API] Re: Xen-API C Bindings, version 0.4.1, Mike D. Day
[Xen-API] Re: Xen-API C Bindings, version 0.4.1, Mike D. Day
|
|
|