[issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)

Filip Gruszczyński report at bugs.python.org
Mon Nov 30 14:40:43 CET 2009


Filip Gruszczyński <gruszczy at gmail.com> added the comment:

I have created some naive patch, that makes sqlite module raise
ProgrammingError for SQLITE_ERROR code. But I don't know, whether it
might raise ProgrammingError in situation, when OperationalError should be.

Sqlite docs says: 

#define SQLITE_ERROR        1   /* SQL error or missing database */

and I don't really know, whether missing database is operational error
or a programming one. Seems like the first one, but this would error
message string parsing, that doesn't seem to pretty. Could anyone
suggest me, what else could be done?

----------
keywords: +patch
nosy: +gruszczy
Added file: http://bugs.python.org/file15418/sqlite_ProgrammingError.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7394>
_______________________________________


More information about the Python-bugs-list mailing list