[Libvir] Include actual error info in python exceptions

The current python bindings throw a generic libvirtError exception object whose message merely consists of the name of the method which failed. This isn't really all that useful to the caller, since they know exactly which method failed - its the one they just called! The attached patch adds a binding for virConGetLastError & virGetLastError & pulls this info into the libvirtError object being thrown. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Wed, Oct 25, 2006 at 07:25:23PM +0100, Daniel P. Berrange wrote:
The current python bindings throw a generic libvirtError exception object whose message merely consists of the name of the method which failed. This isn't really all that useful to the caller, since they know exactly which method failed - its the one they just called! The attached patch adds a binding for virConGetLastError & virGetLastError & pulls this info into the libvirtError object being thrown.
Right, that's a nice improvement. I wonder why I didn't add the bindings for the error function since the exception class was defined. Maybe I stopped in the middle :-\ thanks ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard