diff options
author | Mura Li <typeless@users.noreply.github.com> | 2019-03-27 19:15:23 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-03-27 19:15:23 +0800 |
commit | d77176912bccf1dc0ad93366df55f00fee23b498 (patch) | |
tree | 309fc6350f77f4061360160b88343360d45d5d24 /vendor/github.com/lib/pq/error.go | |
parent | d578b71d61ee8131e8abf7f538b93d8c6cc6fe6d (diff) | |
download | gitea-d77176912bccf1dc0ad93366df55f00fee23b498.tar.gz gitea-d77176912bccf1dc0ad93366df55f00fee23b498.zip |
Use Go1.11 module (#5743)
* Migrate to go modules
* make vendor
* Update mvdan.cc/xurls
* make vendor
* Update code.gitea.io/git
* make fmt-check
* Update github.com/go-sql-driver/mysql
* make vendor
Diffstat (limited to 'vendor/github.com/lib/pq/error.go')
-rw-r--r-- | vendor/github.com/lib/pq/error.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go index b4bb44cee3..96aae29c65 100644 --- a/vendor/github.com/lib/pq/error.go +++ b/vendor/github.com/lib/pq/error.go @@ -153,6 +153,7 @@ var errorCodeNames = map[ErrorCode]string{ "22004": "null_value_not_allowed", "22002": "null_value_no_indicator_parameter", "22003": "numeric_value_out_of_range", + "2200H": "sequence_generator_limit_exceeded", "22026": "string_data_length_mismatch", "22001": "string_data_right_truncation", "22011": "substring_error", @@ -459,6 +460,11 @@ func errorf(s string, args ...interface{}) { panic(fmt.Errorf("pq: %s", fmt.Sprintf(s, args...))) } +// TODO(ainar-g) Rename to errorf after removing panics. +func fmterrorf(s string, args ...interface{}) error { + return fmt.Errorf("pq: %s", fmt.Sprintf(s, args...)) +} + func errRecoverNoErrBadConn(err *error) { e := recover() if e == nil { @@ -487,7 +493,8 @@ func (c *conn) errRecover(err *error) { *err = v } case *net.OpError: - *err = driver.ErrBadConn + c.bad = true + *err = v case error: if v == io.EOF || v.(error).Error() == "remote error: handshake failure" { *err = driver.ErrBadConn |