[DB-SIG] Error in DB-API 2.0

M.-A. Lemburg mal@lemburg.com
Fri, 10 May 2002 23:22:48 +0200


Godefroid Chapelle wrote:
> 
> Hi,
> 
> After reading DB-API 2.0 spec, it is not clear for me which Error class
> should be raised when trying to reuse a primary key.
> 
> IntegrityError seems to be the best place but DataError could also be
> candidate.
> 
> Your opinion ?

I'd suggest that this is a ProgrammingError -- the programmer
is doing something wrong here, not the database or the user.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/