From: Ian Bicking <ianb@co...> - 2005-09-22 15:10:57
Jeremy Jones wrote:
> I (currently) have a sqlite database which I am inserting into and have
> created and alternate ID for one of the columns in a table. When I try
> to insert a duplicate record, I get a sqlite.IntegrityError. I was
> initially expecting something like a sqlobject.IntegrityError so that if
> I switched out databases, I wouldn't have to either change which
> exception I'm looking for or have duplicate integrety error exceptions
> I'm looking for (one for each potential DB in each spot I'm looking for
> an integrity error). I looked through the docs and couldn't find a
> generic integrity exception. Is there one? Plans for one? Not a big
> deal, but I was just wondering....
No; I guess that would be a to-do item. But you can do
MyClass._connection.module.IntegrityError -- verbose but functional.
Ian Bicking / ianb@... / http://blog.ianbicking.org