errorx

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxStackDepth = 5

最大可纪录的调用堆栈的深度

Functions

func Errorf

func Errorf(format string, args ...interface{}) error

Errorf 创建一个具有文本信息的错误

func New

func New(text string) error

New 创建一个具有文本信息的错误

Types

type StringError

type StringError string

StringError 简单的字符串型错误

func (StringError) Error

func (err StringError) Error() string

type TracedError

type TracedError interface {
	error
	Callers() []uintptr // 返回堆栈调用信息
	Unpack() error      // 返回去掉堆栈调用信息的错误
}

func NewTracedError

func NewTracedError(err interface{}) TracedError

NewTracedError 创建一个具有堆栈调用信息的错误

Jump to

Keyboard shortcuts

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