panicreporter

package
Version: v0.0.0-...-5880a07 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 10 Imported by: 0

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 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL