Message95719
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. |
|
Date |
User |
Action |
Args |
2009-11-25 16:39:19 | dontbugme | set | recipients:
+ dontbugme |
2009-11-25 16:39:19 | dontbugme | set | messageid: <1259167159.55.0.802533140683.issue7394@psf.upfronthosting.co.za> |
2009-11-25 16:39:18 | dontbugme | link | issue7394 messages |
2009-11-25 16:39:17 | dontbugme | create | |
|