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'
This commit is contained in:
@@ -27,7 +27,7 @@ func TestFailures(t *testing.T) {
|
||||
if err == nil {
|
||||
_, err = db.Exec("drop table foo")
|
||||
}
|
||||
if err != ErrNotADB {
|
||||
if err.Code != ErrNotADB {
|
||||
t.Error("wrong error code for corrupted DB")
|
||||
}
|
||||
if err.Error() == "" {
|
||||
|
||||
Reference in New Issue
Block a user