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