errors

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: MIT Imports: 8 Imported by: 0

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

Stack 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

func WithStack

func WithStack(err error) Error

func Wrap

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

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