errors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnNotFount     = New("conn not found")
	RouteNotFount    = New("route not found")
	MethodNotAllowed = New("method not allowed")
	ClientClosed     = New("client closed")
	NilError         = New("nil error")
	ServerClosed     = New("server closed")
	Timeout          = New("timeout")
	Invalid          = New("invalid")
	MaximumExceeded  = New("maximum exceeded")
	AssertionFailed  = New("assertion failed")
	StopPropagation  = New("stop propagation")
)

Functions

func Errorf

func Errorf(f string, args ...any) error

func Is

func Is(err, target error) bool

func New

func New(text any) error

func Unwrap

func Unwrap(err error) error

func WithStack

func WithStack(b bool)

func Wrap

func Wrap(err error, text any) error

func Wrapf

func Wrapf(err error, f string, args ...any) error

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Format

func (e *Error) Format(s fmt.State, verb rune)

func (*Error) Unwrap

func (e *Error) Unwrap() error

Jump to

Keyboard shortcuts

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