mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Log errors from rows.Close (#920)
* Log errors from rows.Close * fixed imports * Added contextual messages * fixed review changes
This commit is contained in:
parent
c2bd0b97b3
commit
c019ad7086
43 changed files with 118 additions and 69 deletions
|
@ -18,6 +18,8 @@ package postgres
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/matrix-org/dendrite/common"
|
||||
)
|
||||
|
||||
const roomAliasesSchema = `
|
||||
|
@ -95,7 +97,7 @@ func (s *roomAliasesStatements) selectAliasesFromRoomID(
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close() // nolint: errcheck
|
||||
defer common.CloseAndLogIfError(ctx, rows, "selectAliasesFromRoomID: rows.close() failed")
|
||||
|
||||
var aliases []string
|
||||
for rows.Next() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue