panicreporter

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package panicreporter provide middleware to report any golang panic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(reporter func(error)) func(http.HandlerFunc) http.HandlerFunc

New return panic reporter middleware

When panic occurs, that panic will be reported sing reporter function, the error will be generated using https://pkg.go.dev/github.com/payfazz/go-errors/v2 so you can use StackTrace function to get where the panic occurs

if reporter is nil, then every panic will be printed to stderr

Types

This section is empty.

Jump to

Keyboard shortcuts

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