Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CrashOnError = false
CrashOnError causes a coredump to be produced when an internal error occurs or a fatal signal is received.
Functions ¶
func Die ¶
func Die(dieCb DieCb)
Die causes a backtrace to be produced. If CrashOnError is set a coredump will be produced, else the program will exit.
func FatalSignal ¶
FatalSignal returns true if the specified signal should cause the program to abort.
func HandlePanic ¶
func HandlePanic(dieCb DieCb)
HandlePanic writes a message to the logger and then calls Die().
func HandledSignals ¶
HandledSignals returns a list of signals the package can deal with.
func NonFatalSignal ¶
NonFatalSignal returns true if the specified signal should simply cause the program to Backtrace() but continue running.
Types ¶
type DieCb ¶
type DieCb func()
DieCb is the callback function type that needs to be defined for every call into the Die() function. This callback will be run as the first function of the Die() implementation.
Source Files
¶
- signals.go