rerrors

package
v1.0.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	ErrType ErrorType
	Err     error
	Data    interface{}
}

func Errorf

func Errorf(errType ErrorType, format string, args ...interface{}) *Error

func New

func New(errType ErrorType, msg string) *Error

func Wrap

func Wrap(errType ErrorType, err error, msg string) *Error

func Wrapf

func Wrapf(errType ErrorType, err error, format string, args ...interface{}) *Error

func (*Error) Error

func (e *Error) Error() string

type ErrorType

type ErrorType string
const (
	NetworkError   ErrorType = "network-error"
	NetworkTimeout ErrorType = "network-timeout"
	URLError       ErrorType = "error-url"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL