Documentation ¶
Overview ¶
Package errors provides simple functions to manipulate errors.
Very note that, this package is quite a base package, which should not import extra packages except standard packages, to avoid cycle imports.
Index ¶
- func Cause(err error) error
- func New(text string) error
- func NewSkip(skip int, text string) error
- func Newf(format string, args ...interface{}) error
- func NewfSkip(skip int, format string, args ...interface{}) error
- func Stack(err error) string
- func Wrap(err error, text string) error
- func Wrapf(err error, format string, args ...interface{}) error
- type ApiCause
- type ApiStack
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSkip ¶
NewSkip creates and returns an error which is formatted from given text. The parameter <skip> specifies the stack callers skipped amount.
func NewfSkip ¶
NewfSkip returns an error that formats as the given format and args. The parameter <skip> specifies the stack callers skipped amount.
func Stack ¶
Stack returns the stack callers as string. It returns an empty string if the <err> does not support stacks.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is custom error for additional features.
Click to show internal directories.
Click to hide internal directories.