errors

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As added in v1.3.7

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 added in v1.3.7

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