Package paniccatcher package exposes a set of utility structures and methods that support standardized panic catching and handling.
Example is a very simple example of how to use Catch to recover from a panic and log its stack trace.
Output: Doing something... Caught a panic: Something wrong happened!
func Catch(cb func(p *Panic))
Catch recovers from panic. It should be used as a deferred call.
If the supplied panic callback is nil, the panic will be silently discarded. Otherwise, the callback will be invoked with the panic's information.