[Libvir] new ruby error handling

Vadim Zaliva lord at crocodile.org
Fri Apr 11 06:28:12 UTC 2008

I have a dumb question about new error handling. What is the rationale  
for using
'libvirt_message' instead of 'message' in new Libvirt Ruby error  
Here is an example of code I am writing:

   rescue SystemCallError
   rescue Libvirt::Error

instead of, shorter:

   rescue Libvirt::Error, SystemCallError

In reality, my rescue classes are bit longer, so the code gets hairy.
Wouldn't it be better to use standard 'message' attribute instead?


"La perfection est atteinte non quand il ne reste rien a ajouter, mais
quand il ne reste rien a enlever."  (Antoine de Saint-Exupery)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1607 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080410/7c02ec49/attachment-0001.p7s>

More information about the libvir-list mailing list