mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 08:26:15 -06:00
whoops, add missing vendor changes...
This commit is contained in:
parent
16a8e47704
commit
8c601beaa3
38 changed files with 833 additions and 830 deletions
16
vendor/github.com/ncruces/go-sqlite3/error.go
generated
vendored
16
vendor/github.com/ncruces/go-sqlite3/error.go
generated
vendored
|
|
@ -15,7 +15,7 @@ type Error struct {
|
|||
str string
|
||||
msg string
|
||||
sql string
|
||||
code uint64
|
||||
code res_t
|
||||
}
|
||||
|
||||
// Code returns the primary error code for this error.
|
||||
|
|
@ -146,27 +146,27 @@ func (e ExtendedErrorCode) Code() ErrorCode {
|
|||
return ErrorCode(e)
|
||||
}
|
||||
|
||||
func errorCode(err error, def ErrorCode) (msg string, code uint32) {
|
||||
func errorCode(err error, def ErrorCode) (msg string, code res_t) {
|
||||
switch code := err.(type) {
|
||||
case nil:
|
||||
return "", _OK
|
||||
case ErrorCode:
|
||||
return "", uint32(code)
|
||||
return "", res_t(code)
|
||||
case xErrorCode:
|
||||
return "", uint32(code)
|
||||
return "", res_t(code)
|
||||
case *Error:
|
||||
return code.msg, uint32(code.code)
|
||||
return code.msg, res_t(code.code)
|
||||
}
|
||||
|
||||
var ecode ErrorCode
|
||||
var xcode xErrorCode
|
||||
switch {
|
||||
case errors.As(err, &xcode):
|
||||
code = uint32(xcode)
|
||||
code = res_t(xcode)
|
||||
case errors.As(err, &ecode):
|
||||
code = uint32(ecode)
|
||||
code = res_t(ecode)
|
||||
default:
|
||||
code = uint32(def)
|
||||
code = res_t(def)
|
||||
}
|
||||
return err.Error(), code
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue