[DB-SIG] what's wrong an exception-catching class?

Chris Cogdon chris@cogdon.org
Tue, 26 Nov 2002 14:22:51 -0800


On Tuesday, Nov 26, 2002, at 14:17 US/Pacific, Magnus Lycka wrote:

> At 11:32 2002-11-26 -0800, Chris Cogdon wrote:
>> This is why I feel that there is no 'standard library' for catching 
>> exceptions, because the 'correct' thing for any particular 
>> application varies widely and wildly between applications.
>
> On the other hand, it could be useful if the raised exceptions
> followed some kind of standard. After all, it's not the vendor
> specific code that throws Python exceptions, it's the Python
> database drivers. If there was a standard for these exceptions,
> it would be easier to write generic DB-API programs. IIRC, this
> has been discussed on this list...

Oh... absolutely agree. And if the database writer needs to add in 
special information to the exceptions, then she can subclass the 
standard exceptions.


-- 
    ("`-/")_.-'"``-._        Chris Cogdon <chris@cogdon.org>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL