Skip to content

Commit 2a93c2c

Browse files
committed
Document NormalizeErr func.
1 parent c29b1a6 commit 2a93c2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sqldb.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ func RowsAffected(result sql.Result, err error) (uint64, error) {
7979
}
8080
return uint64(rows), nil
8181
}
82+
83+
// NormalizeErr attaches a stack trace to non-nil errors and also normalizes errors that are
84+
// semantically equal to context.Canceled. At present we are unaware whether this is still a
85+
// commonly encountered scenario.
8286
func NormalizeErr(err error) error {
8387
if err == nil {
8488
return nil

0 commit comments

Comments
 (0)