PackageDescription |
Panicwrap is a Go library that re-executes a Go binary and monitors stderr
output from the binary for a panic. When it find a panic, it executes a
user-defined handler function. Stdout, stderr, stdin, signals, and exit codes
continue to work as normal, making the existence of panicwrap mostly invisble to
the end user until a panic actually occurs.
Since a panic is truly a bug in the program meant to crash the runtime, globally
catching panics within Go applications is not supposed to be possible. Despite
this, it is often useful to have a way to know when panics occur. panicwrap
allows you to do something with these panics, such as writing them to a file, so
that you can track when panics occur.
Panicwrap is not a panic recovery system. Panics indicate serious problems with
your application and should crash the runtime. panicwrap is just meant as a way
to monitor for panics. If you still think this is the worst idea ever, read the
section below on why. |