Skip to content

Conversation

drivebyer
Copy link
Contributor

We should wrap error like:

defer func() {
if err2 := rows.Close(); err2 != nil {
if err != nil {
err = fmt.Errorf("error when closing query cursor: %v, previous error: %v", err2, err)
} else {
err = fmt.Errorf("error when closing query cursor: %v", err2)
}
}
}()

@FxKu
Copy link
Member

FxKu commented Mar 14, 2024

👍

1 similar comment
@hughcapet
Copy link
Member

👍

@FxKu FxKu added this to the 1.11.0 milestone Mar 14, 2024
@FxKu FxKu merged commit 773c039 into zalando:master Mar 14, 2024
@FxKu
Copy link
Member

FxKu commented Mar 14, 2024

Thanks @drivebyer for your contribution!

@drivebyer drivebyer deleted the error-ignored branch March 14, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants