1
0
Fork 0

Protect against nil return objects

master
Philip O'Toole 8 months ago
parent c36de556ec
commit 0055b69516

@ -652,8 +652,10 @@ func (db *DB) executeStmtWithConn(ctx context.Context, stmt *command.Statement,
defer func() {
if retErr != nil {
retErr = rewriteContextTimeout(retErr, ErrExecuteTimeout)
if res != nil {
res.Error = retErr.Error()
}
}
}()
result := &command.ExecuteResult{}
start := time.Now()
@ -813,8 +815,10 @@ func (db *DB) queryStmtWithConn(ctx context.Context, stmt *command.Statement, xT
defer func() {
if retErr != nil {
retErr = rewriteContextTimeout(retErr, ErrQueryTimeout)
if retRows != nil {
retRows.Error = retErr.Error()
}
}
}()
rows := &command.QueryRows{}
start := time.Now()

Loading…
Cancel
Save