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
Click to show internal directories.
Click to hide internal directories.