errstack

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstWithStack

func FirstWithStack(err error) error

FirstWithStack returns the first error in the chain of errors that has a stack trace associated with it. The chain of errors is determined by repeatedly calling Unwrap() on the err. "First" is defined as the error that is returned by the last call to Unwrap().

func Println

func Println(err error)

Println is a convenience function (sugar) that prints the output of ToString(err) to standard output.

func ToString added in v0.4.0

func ToString(err error) string

ToString returns a string representation of the error err. If err represents a chain of errors, ToString appends a representation of the first (deepest) error in the chain that has a stack trace, if any. The chain of errors is formed by recursively calling Unwrap() on err.

Types

This section is empty.

Jump to

Keyboard shortcuts

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