tb

package
v2.0.0-alpha3+incompat... Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2015 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package tb 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.

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
}

StackError represents an error along with a stack trace.

Jump to

Keyboard shortcuts

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