[RFC] Exception is VDSM

Simon Grinberg simon at redhat.com
Thu Aug 16 16:12:04 UTC 2012



----- Original Message -----
> From: "Saggi Mizrahi" <smizrahi at redhat.com>
> To: "arch" <arch at ovirt.org>, "VDSM Project Development" <vdsm-devel at lists.fedorahosted.org>
> Sent: Thursday, August 16, 2012 6:39:26 PM
> Subject: [RFC] Exception is VDSM
> 
> Currently we have very specific exceptions.
> This causes proliferation of exception with no real gain.
> 
> There is really no benefit for each call to throw it's own error
> message:
> For instance,
> MiscFileReadException
> MiscFileWriteException
> MiscBlockReadException
> MiscBlockWriteException
> * There are about a 100 of these.
> 
> Could all just be "general exception". The user knows what command it
> ran there is no need have the exceptions specify that.

Who is this 'user'?

Does 'user' operation necessary invokes just one of the above in a 1:1 correlation to what he tries to do? no complex operation that may lead to ambiguity? 

     
> 
> Also exception like:
> ImageDoesNotExistInSD
> StoragePoolMasterNotFound
> StoragePoolUnknown
> VMPathNotExists
> 
> Actually just mean ENOENT or EntityDoesNotExist in different
> contexts. There is no real reason to distinguish between them
> because they are also context driven.
> 
> Cutting down on the amount of exceptions to error archetypes similar
> to standard c errors will give us simpler API.
> Also, having a specific set of exceptions per call means that every
> new API means a new group of supported exceptions. This makes
> forward compatibility very problematic.
> _______________________________________________
> Arch mailing list
> Arch at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/arch
> 



More information about the Arch mailing list