Commit Graph

7 Commits

Author SHA1 Message Date
Robert Knight 72bb737cf9 Add unit test for enhanced error reporting
Add a test to check for a useful response for a SQL
query that cannot be executed due to a constraint failure
2013-11-19 14:05:48 +00:00
Robert Knight e0729751ac Update test expectations follow change of concrete error type 2013-11-19 13:53:24 +00:00
Robert Knight 19cb26da92 Provide more detailed error messages
Use the sqlite3_errmsg() API to retrieve more specific error
messages.

eg. Attempting to exec 'CREATE TABLE ExistingTableName (...)'
will now report 'table already exists: ExistingTableName' rather
than 'SQL logic error or missing database'
2013-11-19 09:13:19 +00:00
mattn 6176b90b70 Add tests 2013-09-03 19:36:33 +09:00
Jochen Voss 2d6a60e2f5 Start work on introducing machine-readable error codes.
This commit introduces a new type 'ErrNo', implementing the error
interface.  Constants for all sqlite3 error codes are provided
in the new source file "error.go".
2013-08-30 22:35:32 +09:00
mattn 34a33cffaa Rervert ff8e6729ce 2013-08-14 12:07:38 +09:00
Jochen Voss ff8e6729ce Start work on introducing machine-readable error codes.
This commit introduces a new type 'ErrNo', implementing the error
interface.  Constants for all sqlite3 error codes are provided
in the new source file "error.go".
2013-08-13 21:45:05 +09:00