Documentation ¶
Index ¶
- func AWSErrorExceptionCode(err error) string
- func AWSErrorWithoutExceptionCode(err error) error
- func As(err error, target any) bool
- func HTTPCode(err error) int
- func Is(e1, e2 error) bool
- func IsRetryableError(err error) bool
- func IsRetryableErrorOrShouldFail(err error) (shouldRetry bool, shouldFail bool)
- type Caller
- type CallerInfo
- type CustomError
- func Error(message string) *CustomError
- func Errorf(format string, args ...interface{}) *CustomError
- func HTTP(code int, err error, format string, args ...interface{}) *CustomError
- func HTTPCodeOnly(code int) *CustomError
- func HTTPWithError(code int, err error) *CustomError
- func HTTPWithMsg(code int, format string, args ...interface{}) *CustomError
- func ToCustomError(err error) *CustomError
- func Wrap(err error, msg string) *CustomError
- func Wrapf(err error, format string, args ...interface{}) *CustomError
- func (err *CustomError) BypassRaygun() *CustomError
- func (err *CustomError) BypassSQSError() *CustomError
- func (err *CustomError) Cause() error
- func (err *CustomError) Code() int
- func (err *CustomError) Description() Description
- func (err *CustomError) Error() string
- func (err *CustomError) Format(s fmt.State, v rune)
- func (err *CustomError) Formatted(opts FormattingOptions) string
- func (err *CustomError) Is(specificError error) bool
- func (err *CustomError) ShouldBypassRaygun() bool
- func (err *CustomError) ShouldBypassSQSError() bool
- type Description
- type ErrorWithCause
- type ErrorWithIs
- type FormattingOptions
- type ICaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSErrorExceptionCode ¶ added in v1.99.0
func AWSErrorWithoutExceptionCode ¶ added in v1.95.0
func IsRetryableError ¶
func IsRetryableErrorOrShouldFail ¶ added in v1.119.0
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
e.g.:
func (Caller) Info ¶
func (c Caller) Info() CallerInfo
func (Caller) Package ¶
with Function: "github.com/go-msvc/ms_test.TestCaller" return "github.com/go-msvc/ms_test"
func (Caller) PackageFile ¶
return "github.com/go-msvc/ms_test/my_test.go"
type CallerInfo ¶
type CallerInfo struct { Package string `json:"package"` File string `json:"file"` Line int `json:"line"` Function string `json:"function"` }
func Stack ¶
func Stack(skip int) []CallerInfo
type CustomError ¶
type CustomError struct {
// contains filtered or unexported fields
}
CustomError implements the following interfaces:
error github.com/pkg/errors: Cause
func Error ¶
func Error(message string) *CustomError
func Errorf ¶
func Errorf(format string, args ...interface{}) *CustomError
func HTTPCodeOnly ¶
func HTTPCodeOnly(code int) *CustomError
func HTTPWithError ¶
func HTTPWithError(code int, err error) *CustomError
func HTTPWithMsg ¶
func HTTPWithMsg(code int, format string, args ...interface{}) *CustomError
func ToCustomError ¶ added in v1.187.0
func ToCustomError(err error) *CustomError
func Wrap ¶
func Wrap(err error, msg string) *CustomError
func Wrapf ¶
func Wrapf(err error, format string, args ...interface{}) *CustomError
func (*CustomError) BypassRaygun ¶ added in v1.185.0
func (err *CustomError) BypassRaygun() *CustomError
func (*CustomError) BypassSQSError ¶ added in v1.185.0
func (err *CustomError) BypassSQSError() *CustomError
func (*CustomError) Cause ¶
func (err *CustomError) Cause() error
implement github.com/pkg/errors: Cause
func (*CustomError) Code ¶
func (err *CustomError) Code() int
func (*CustomError) Description ¶
func (err *CustomError) Description() Description
func (*CustomError) Formatted ¶
func (err *CustomError) Formatted(opts FormattingOptions) string
func (*CustomError) Is ¶
func (err *CustomError) Is(specificError error) bool
Is() compares the message string of this or any cause to match the specified error message
func (*CustomError) ShouldBypassRaygun ¶ added in v1.185.0
func (err *CustomError) ShouldBypassRaygun() bool
func (*CustomError) ShouldBypassSQSError ¶ added in v1.185.0
func (err *CustomError) ShouldBypassSQSError() bool
type Description ¶
type Description struct { Message string `json:"error"` Source *CallerInfo `json:"source,omitempty"` Cause *Description `json:"cause,omitempty"` }
type ErrorWithCause ¶
extends default golang error interface
type ErrorWithIs ¶
type FormattingOptions ¶
Click to show internal directories.
Click to hide internal directories.