aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2014-06-25 11:34:13 +0900
committermattn <mattn.jp@gmail.com>2014-06-25 11:34:13 +0900
commita59fbb40eb2307e1d35b3d3785b040ede3f7990d (patch)
tree0cf7866f7211da9b409afb38cfb5e143c8432200 /sqlite3.go
parentRemove dead code in SQLiteRows.Bind. Close #119 (diff)
parentFix ErrNoticeRecoverWAL variable name. (diff)
downloadgolite-a59fbb40eb2307e1d35b3d3785b040ede3f7990d.tar.gz
golite-a59fbb40eb2307e1d35b3d3785b040ede3f7990d.tar.xz
Merge pull request #116 from c14n/master
Enable extended error codes.
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 8df3ef2..3d5110b 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -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)),
}
}