recovery

package
v1.1.38 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicHandler

func PanicHandler() func(http.Handler) http.Handler

PanicHandler creates an handler that intercepts panics

func PanicRecovery

func PanicRecovery(err *error, logErrors bool, txnID string) func()

PanicRecovery returns a general use Panic Recovery function to capture panics, optionally log them, and return them, as errors. A pointer to the error to populate will be passed in via the err parameter.

usage: defer PanicRecovery(&err, true)()

Types

This section is empty.

Jump to

Keyboard shortcuts

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