mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
Tests.
This commit is contained in:
6
error.go
6
error.go
@@ -13,6 +13,7 @@ type Error struct {
|
||||
code uint64
|
||||
str string
|
||||
msg string
|
||||
sql string
|
||||
}
|
||||
|
||||
// Code returns the primary error code for this error.
|
||||
@@ -49,6 +50,11 @@ func (e *Error) Error() string {
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// SQL returns the SQL starting at the token that triggered a syntax error.
|
||||
func (e *Error) SQL() string {
|
||||
return e.sql
|
||||
}
|
||||
|
||||
type errorString string
|
||||
|
||||
func (e errorString) Error() string { return string(e) }
|
||||
|
||||
Reference in New Issue
Block a user