errors

package
v1.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	New    = errors.New
	Is     = errors.Is
	As     = errors.As
	Unwrap = errors.Unwrap
)

Functions

func Cause

func Cause(err error) interface{}

Cause 获取封装的异常源。

func ToString

func ToString(err error) string

ToString 返回 error 的字符串。

func WithCause

func WithCause(r interface{}) error

WithCause 封装一个异常源。

func WithFileLine

func WithFileLine(err error, skip int) error

WithFileLine 返回错误发生的文件行号,skip 是相对于当前函数的深度。

Types

This section is empty.

Jump to

Keyboard shortcuts

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