[Yum-devel] [Patch] Catch sqlite exceptions and convert them to YumBaseError

Florian Festi ffesti at redhat.com
Thu Dec 6 10:37:32 UTC 2007


seth vidal wrote:
> On Wed, 2007-12-05 at 11:03 +0100, Florian Festi wrote:
>> Possible solution for https://bugzilla.redhat.com/show_bug.cgi?id=403371
>>
>> Comments?
>>
> 
> decorators fill me with bile. I realize it causes fewer lines of code,
> it just feels wrong to me.
I cannot pretend that this reaction is unexpected...

My point is that the alternatives are not that much more adorable:

1. Ignore the problem
2. Add 20 try/except blocks
3. Push the exception transition down to sqlutils.executeSQL (wrong level of 
abstracction but IMHO the least painful alternative) and add try/exept for 
what's left.

> Also - swap the YumBaseError for either RepoError or some new error so
> we have better specificity but can catch it with YumBaseError
> generically.
Valid point, I was just unsure which one to pick.


Florian



More information about the Yum-devel mailing list