mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
SQLite 3.51.0.
This commit is contained in:
@@ -26,11 +26,16 @@ func NewContext(ctx context.Context) context.Context {
|
||||
}
|
||||
|
||||
func GetSystemError(ctx context.Context) error {
|
||||
s := ctx.Value(moduleKey{}).(*moduleState)
|
||||
return s.sysError
|
||||
// Test needed to simplify testing.
|
||||
s, ok := ctx.Value(moduleKey{}).(*moduleState)
|
||||
if ok {
|
||||
return s.sysError
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetSystemError(ctx context.Context, err error) {
|
||||
// Test needed to simplify testing.
|
||||
s, ok := ctx.Value(moduleKey{}).(*moduleState)
|
||||
if ok {
|
||||
s.sysError = err
|
||||
|
||||
Reference in New Issue
Block a user