errstack

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The size of the stack trace buffer for reading.  Stack traces will not be
	// longer than this.
	StackTraceSize = 4096
)

Variables

This section is empty.

Functions

func New

func New(err error) error

New returns a new Error. If err is already a errstack.Error, it's a no-op.

func Newf

func Newf(format string, args ...interface{}) error

Newf creates a new Error.

Types

type Error

type Error struct {
	Err   error
	Stack []byte
}

Error wraps an error and attaches the stack trace at the moment of emission.

func (*Error) Error

func (err *Error) Error() string

Error returns the error string

Jump to

Keyboard shortcuts

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