skip

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package skip provides a frame skipping version of cling for re-use in APIs.

For complete documentation, see the cling package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf added in v0.0.2

func Errorf(skip uint, format string, a ...interface{}) error

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

func New(skip uint, text string) error

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

func Seal(err error, skip uint, text string) error

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

func Sealf(err error, skip uint, format string, a ...interface{}) error

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

func Wrap(err error, skip uint, text string) error

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

func Wrapf(err error, skip uint, format string, a ...interface{}) error

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.

Jump to

Keyboard shortcuts

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