[Ovirt-devel] [Patch] better exceptions for ruby-libvirt bindings

David Lutterkort dlutter at redhat.com
Thu Mar 27 16:14:46 UTC 2008


On Wed, 2008-03-26 at 19:58 -0400, Mohammed Morsi wrote:
> Defined custom libvirt ruby exceptions and altered the code so as to 
> throw them instead of the generic 'rb_eSystemCallError'. If additional 
> more-granular exceptions are needed, they can be easily added.

The patch looks good, except for some small formatting issues (try to
keep the lines to < 80 columns, I usually stop at 78)

>  (note 
> this diff is against ruby-libvirt-0.0.2 due to issues with the upstream 
> ruby-libvirt and libvirt-devel)

The issue, I assume is that the ruby-libvirt bindings will only build
against a libvirt with storage API. That really needs to be ifdef'd out;
one option is to do that function by function: that's so tedious that
we'll probably need to switch to generating _libvirt.c.

The other option is to just check for certain types (like
virStoragePoolPtr) and then ifdefing the whole storage API out. I'll
have a stab at that and hope that it won't make forward porting your
patch impossible.

David





More information about the ovirt-devel mailing list