According to http://www.python.org/dev/peps/pep-0249/ ,
this is an optional DB API extension:
Connection Attributes .Error, .ProgrammingError, etc. All exception classes defined by the DB API
standard should be
exposed on the Connection objects as attributes
to being available at module scope).
These attributes simplify error handling in
This would be convenient for writing more portable code.
It would be nice if I could get exceptions from the
connection and not have to import them from whatever
db-api module I happen to be using.