Mercurial > gemma
comparison pkg/pgxutils/errors.go @ 4063:fe3dd65c0891
Rename HandlePGError to HandleError.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 25 Jul 2019 11:46:23 +0200 |
parents | 6c760abcff0e |
children | 5867dcf8e93c |
comparison
equal
deleted
inserted
replaced
4062:6c760abcff0e | 4063:fe3dd65c0891 |
---|---|
18 | 18 |
19 "github.com/jackc/pgx" | 19 "github.com/jackc/pgx" |
20 ) | 20 ) |
21 | 21 |
22 // Handle PostgreSQL error codes | 22 // Handle PostgreSQL error codes |
23 func HandlePGError(err error) error { | 23 func HandleError(err error) error { |
24 switch e := err.(type) { | 24 switch e := err.(type) { |
25 case pgx.PgError: | 25 case pgx.PgError: |
26 return dbError(e) | 26 return dbError(e) |
27 } | 27 } |
28 return err | 28 return err |