mirror of
https://github.com/containers/podman.git
synced 2025-09-27 00:34:32 +08:00
Bump github.com/uber/jaeger-client-go
Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.28.0+incompatible to 2.29.1+incompatible. - [Release notes](https://github.com/uber/jaeger-client-go/releases) - [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber/jaeger-client-go/compare/v2.28.0...v2.29.1) Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
44
vendor/github.com/uber/jaeger-client-go/thrift/protocol_exception.go
generated
vendored
44
vendor/github.com/uber/jaeger-client-go/thrift/protocol_exception.go
generated
vendored
@ -21,6 +21,7 @@ package thrift
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Thrift Protocol exception
|
||||
@ -40,8 +41,15 @@ const (
|
||||
)
|
||||
|
||||
type tProtocolException struct {
|
||||
typeId int
|
||||
message string
|
||||
typeId int
|
||||
err error
|
||||
msg string
|
||||
}
|
||||
|
||||
var _ TProtocolException = (*tProtocolException)(nil)
|
||||
|
||||
func (tProtocolException) TExceptionType() TExceptionType {
|
||||
return TExceptionTypeProtocol
|
||||
}
|
||||
|
||||
func (p *tProtocolException) TypeId() int {
|
||||
@ -49,30 +57,48 @@ func (p *tProtocolException) TypeId() int {
|
||||
}
|
||||
|
||||
func (p *tProtocolException) String() string {
|
||||
return p.message
|
||||
return p.msg
|
||||
}
|
||||
|
||||
func (p *tProtocolException) Error() string {
|
||||
return p.message
|
||||
return p.msg
|
||||
}
|
||||
|
||||
func (p *tProtocolException) Unwrap() error {
|
||||
return p.err
|
||||
}
|
||||
|
||||
func NewTProtocolException(err error) TProtocolException {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
if e,ok := err.(TProtocolException); ok {
|
||||
|
||||
if e, ok := err.(TProtocolException); ok {
|
||||
return e
|
||||
}
|
||||
if _, ok := err.(base64.CorruptInputError); ok {
|
||||
return &tProtocolException{INVALID_DATA, err.Error()}
|
||||
|
||||
if errors.As(err, new(base64.CorruptInputError)) {
|
||||
return NewTProtocolExceptionWithType(INVALID_DATA, err)
|
||||
}
|
||||
return &tProtocolException{UNKNOWN_PROTOCOL_EXCEPTION, err.Error()}
|
||||
|
||||
return NewTProtocolExceptionWithType(UNKNOWN_PROTOCOL_EXCEPTION, err)
|
||||
}
|
||||
|
||||
func NewTProtocolExceptionWithType(errType int, err error) TProtocolException {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
return &tProtocolException{errType, err.Error()}
|
||||
return &tProtocolException{
|
||||
typeId: errType,
|
||||
err: err,
|
||||
msg: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
func prependTProtocolException(prepend string, err TProtocolException) TProtocolException {
|
||||
return &tProtocolException{
|
||||
typeId: err.TypeId(),
|
||||
err: err,
|
||||
msg: prepend + err.Error(),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user