errors

package
v2.16.6-prerelease Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(err error, target any) bool

func GetStackTrace

func GetStackTrace() []string

GetStackTrace retrieves the full stack (minus any runtime related functions) from where the Error was instantiated

func Is

func Is(err, target error) bool

Types

type Tracer

type Tracer interface {
	// Trace returns the long format stack trace from where the error was instantiated
	Trace() []string
}

Tracer provides a stack trace

type TracerError

type TracerError interface {
	Tracer
	error
}

TracerError is an amalgamation of the Tracer and error interfaces

func New

func New(format string, args ...interface{}) TracerError

New instantiates a TracerError with a stack trace

func Wrap

func Wrap(err error) TracerError

Wrap an existing error in a TracerError

Jump to

Keyboard shortcuts

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