panics

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallBackFn

type CallBackFn func(recoverObj interface{}, debugStackTrace string)

CallBackFn is a function that will get called with information about the panic

type PanicHandler

type PanicHandler func(interface{}) error

PanicHandler is a function that can be called with the result of revover() within a deferred to recover from panics and pass them to a callback it returns an error if a recovery was needed

func MakeHandler

func MakeHandler(cb CallBackFn) PanicHandler

MakeHandler makes a handler that recovers from panics and passes them to the given callback

type RecoveredPanicErr

type RecoveredPanicErr struct {
	PanicObj        interface{}
	DebugStackTrace string
}

RecoveredPanicErr captures panics that happen during execution of a single request or response The assumption is we want to make sure all of graphsync doesn't go down cause a single block load or selector execution fails

func (RecoveredPanicErr) Error

func (rpe RecoveredPanicErr) Error() string

Jump to

Keyboard shortcuts

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