errs

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Zlib Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound    = New(40400000, "请求资源不存在")
	ErrCodeUnknown = New(50000001, "系统错误")
)
View Source
var (
	ErrTracerNotEnabled = New(50000011, "链路跟踪未开启")
)

Functions

func Cause

func Cause(err error) error

func StackTrace

func StackTrace(err error) string

func Wrap

func Wrap(err error, msg string) error

Types

type APICoder

type APICoder interface {
	Code() int
	Message() string
	Reference() string
	Error() string
}

func AsAPICoder

func AsAPICoder(err error) APICoder

func New

func New(code int, message string, reference ...string) APICoder

Jump to

Keyboard shortcuts

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