stackerr

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEBUG = false

Functions

func Cleanmodulepath

func Cleanmodulepath(p string) string

Types

type FuncCallerInfo

type FuncCallerInfo struct {
	// contains filtered or unexported fields
}

func GetFuncCallerInfo

func GetFuncCallerInfo(skips ...int) FuncCallerInfo

func (FuncCallerInfo) String

func (fci FuncCallerInfo) String() string

type StackError

type StackError struct {
	St FuncCallerInfo
	// contains filtered or unexported fields
}

func Errorf

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

Errorf with stack trace from caller. Use %w !

func Wrap

func Wrap(err error, skips ...int) *StackError

Wrap with stack trace from caller's caller (nil error returns nil)

func (*StackError) Format

func (s *StackError) Format(f fmt.State, c rune)

func (*StackError) Stack

func (s *StackError) Stack() FuncCallerInfo

func (*StackError) Underlying

func (s *StackError) Underlying() error

func (*StackError) Unwrap

func (s *StackError) Unwrap() error

Jump to

Keyboard shortcuts

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