Enable extended error codes.

This commit is contained in:
Christoph Martin
2014-04-01 14:01:19 +02:00
parent 58c62dc30c
commit f395aa170e
3 changed files with 265 additions and 34 deletions

View File

@@ -139,8 +139,10 @@ func (c *SQLiteConn) AutoCommit() bool {
}
func (c *SQLiteConn) lastError() Error {
return Error{Code: ErrNo(C.sqlite3_errcode(c.db)),
err: C.GoString(C.sqlite3_errmsg(c.db)),
return Error{
Code: ErrNo(C.sqlite3_errcode(c.db)),
ExtendedCode: ErrNoExtended(C.sqlite3_extended_errcode(c.db)),
err: C.GoString(C.sqlite3_errmsg(c.db)),
}
}