panics

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 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 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