errors

package module
v0.0.0-...-fbae199 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover()

func RecoverStackWithoutLF

func RecoverStackWithoutLF()

func Stack

func Stack(calldepth int) []byte

Taken from runtime/debug.go

func StackErrorf

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

func StackWithoutLF

func StackWithoutLF(calldepth int) string

Types

type Error

type Error interface {
	error
}

Error a error with caller stack information

func Errorf

func Errorf(format string, args ...interface{}) Error

Errorf create a new error

func New

func New(msg string) Error

New create a new error

func WithStack

func WithStack(err error) Error

WithStack add caller stack information

func Wrap

func Wrap(err error, msg string) Error

Wrap with some extra message into err

func Wrapf

func Wrapf(err error, format string, args ...interface{}) Error

Wrapf with some extra message into err

type StackError

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

Jump to

Keyboard shortcuts

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