This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dontbugme
Recipients dontbugme
Date 2009-11-25.16:39:17
SpamBayes Score 5.849833e-09
Marked as misclassified No
Message-id <1259167159.55.0.802533140683.issue7394@psf.upfronthosting.co.za>
In-reply-to
Content
The following code raises OperationalError exceptions:
python -c 'import sqlite3; sqlite3.connect(":memory:").execute("bad
syntax")'
python -c 'import sqlite3; sqlite3.connect(":memory:").execute("SELECT *
FROM no_such_table")'
python -c 'import sqlite3; sqlite3.connect(":memory:").execute("SELECT
no_such_column")'

But ProgrammingError should be raised, as per PEP 249:

        ProgrammingError
          
            Exception raised for programming errors, e.g. table not
            found or already exists, syntax error in the SQL
            statement, wrong number of parameters specified, etc.  It
            must be a subclass of DatabaseError.
History
Date User Action Args
2009-11-25 16:39:19dontbugmesetrecipients: + dontbugme
2009-11-25 16:39:19dontbugmesetmessageid: <1259167159.55.0.802533140683.issue7394@psf.upfronthosting.co.za>
2009-11-25 16:39:18dontbugmelinkissue7394 messages
2009-11-25 16:39:17dontbugmecreate