The highest tagged major version is
v2.
package
Version:
v1.8.3
Opens a new window with list of versions in this module.
Published: Jul 28, 2019
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package errors provides simple functions to manipulate errors.
Cause returns the root cause error.
func New(value interface{}) error
New returns an error that formats as the given value.
NewText returns an error that formats as the given text.
Stack returns the stack callers as string.
It returns an empty string id the <err> does not support stacks.
Wrap wraps error with text.
It returns nil if given err is nil.
Wrapf returns an error annotating err with a stack trace
at the point Wrapf is called, and the format specifier.
It returns nil if given err is nil.
type ApiCause interface {
Cause() error
}
type ApiStack interface {
Stack() string
}
Error is custom error for additional features.
Cause returns the root cause error.
Error implements the interface of Error, it returns the error as string.
Format formats the frame according to the fmt.Formatter interface.
%v, %s : Print the error string;
%-v, %-s : Print current error string;
%+s : Print full stack error list;
%+v : Print the error string and full stack error list;
Stack returns the stack callers as string.
It returns an empty string id the <err> does not support stacks.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.