Documentation ¶
Overview ¶
Package skip provides a frame skipping version of cling for re-use in APIs.
For complete documentation, see the cling package.
Index ¶
- func Errorf(skip uint, format string, a ...interface{}) error
- func New(skip uint, text string) error
- func Seal(err error, skip uint, text string) error
- func Sealf(err error, skip uint, format string, a ...interface{}) error
- func Wrap(err error, skip uint, text string) error
- func Wrapf(err error, skip uint, format string, a ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶ added in v0.0.2
Errorf returns an error with the supplied format specifier, and a frame from the caller's stack. The argument skip is the number of frames to skip over. Caller(0) returns the frame for the caller of Errorf.
This func is intended to be used for implementing APIs on top of cling.
func New ¶ added in v0.0.2
New returns an error with the supplied text, and a frame from the caller's stack. The argument skip is the number of frames to skip over. Caller(0) returns the frame for the caller of New.
This func is intended to be used for implementing APIs on top of cling.
func Seal ¶
Seal returns an error wrapping err with the supplied text, and a frame from the caller's stack. The argument skip is the number of frames to skip over. Caller(0) returns the frame for the caller of Wrap. If err is nil, Wrap returns nil.
The error returned does not implement Unwrap; the error chain is available only for printing.
This func is intended to be used for implementing APIs on top of cling.
func Sealf ¶
Sealf returns an error wrapping err with the supplied format specifier, and a frame from the caller's stack. The argument skip is the number of frames to skip over. Caller(0) returns the frame for the caller of Wrap. If err is nil, Wrap returns nil.
The error returned does not implement Unwrap; the error chain is available only for printing.
This func is intended to be used for implementing APIs on top of cling.
func Wrap ¶
Wrap returns an error wrapping err with the supplied text, and a frame from the caller's stack. The argument skip is the number of frames to skip over. Caller(0) returns the frame for the caller of Wrap. If err is nil, Wrap returns nil.
The error returned implments the Unwrap method, for programatically extracting the error chain.
This func is intended to be used for implementing APIs on top of cling.
func Wrapf ¶
Wrapf returns an error wrapping err with the supplied format specifier, and a frame from the caller's stack. The argument skip is the number of frames to skip over. Caller(0) returns the frame for the caller of Wrap. If err is nil, Wrapf returns nil.
The error returned implments the Unwrap method, for programatically extracting the error chain.
This func is intended to be used for implementing APIs on top of cling.
Types ¶
This section is empty.