go-vitess.v1: gopkg.in/src-d/go-vitess.v1/tb Index | Files

package tb

import "gopkg.in/src-d/go-vitess.v1/tb"

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

Package Files

error.go

func Errorf Uses

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

func Stack Uses

func Stack(calldepth int) []byte

Stack is taken from runtime/debug.go calldepth is the number of (bottommost) frames to skip.

type StackError Uses

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

StackError represents an error along with a stack trace.

Package tb imports 4 packages (graph) and is imported by 16 packages. Updated 2019-06-13. Refresh now. Tools for package owners.