tb

package
v0.0.0-...-9a5932e Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2014 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

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

func Stack

func Stack(calldepth int) []byte

Taken from runtime/debug.go

Types

type StackError

type StackError interface {
	Error() string
	StackTrace() string
}

This package exposes some handy traceback functionality buried in the runtime.

It can also be used to provide context to errors reducing the temptation to panic carelessly, just to get stack information.

The theory is that most errors that are created with the fmt.Errorf style are likely to be rare, but require more context to debug properly. The additional cost of computing a stack trace is therefore negligible.

Jump to

Keyboard shortcuts

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