recovery

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 6 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) 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