panics

package
v0.0.0-...-44f2bf6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover(in func() error) (err error)

func RecoverO1

func RecoverO1[O1 any](in func() (O1, error)) (O1, error)

func RecoverWithSection

func RecoverWithSection(section string, in func() error) error

func RecoverWithSectionL

func RecoverWithSectionL(log logging.Logger, section string, in func() error) error

Types

type PanicError

type PanicError interface {
	error

	Details() PanicErrorDetails
	PanicCause() interface{}
	Stack() StackEntries
}

func IsPanicError

func IsPanicError(err error) (PanicError, bool)

type PanicErrorDetails

type PanicErrorDetails struct {
	OperatorVersion version.InfoV1

	Time time.Time
}

type StackEntries

type StackEntries []StackEntry

func GetStack

func GetStack(skip int) StackEntries

func (StackEntries) String

func (s StackEntries) String() []string

type StackEntry

type StackEntry struct {
	File, Function string
	Line           int
}

func (StackEntry) String

func (s StackEntry) String() string

Jump to

Keyboard shortcuts

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