errorer

package
v0.0.0-...-69bdcc1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerError

func HandlerError(err error) bool

Types

type StatusError

type StatusError struct {
	Err    error
	Status int // 自定义的状态码应当大于1000
}

func Format

func Format(format string, args ...any) *StatusError

func From

func From(err error) *StatusError

func New

func New(msg string) *StatusError

func (*StatusError) Error

func (c *StatusError) Error() string

func (*StatusError) SetError

func (c *StatusError) SetError(err error) *StatusError

func (*StatusError) SetMessage

func (c *StatusError) SetMessage(msg string) *StatusError

func (*StatusError) SetStatus

func (c *StatusError) SetStatus(status int) *StatusError

SetStatus 自定义的状态码应当大于1000

func (*StatusError) String

func (c *StatusError) String() string

Jump to

Keyboard shortcuts

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