Merge pull request #116 from c14n/master

Enable extended error codes.
This commit is contained in:
mattn
2014-06-25 11:34:13 +09:00
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)),
}
}