package runtime
// Recover installs a handler function that is called whenever a panicking sequence
// in any Go routine is not stopped by a call to recover in a locally deferred function call.
//
// If no handler function is installed the program aborts.
//
// By default, no handler function is installed.
//
// The handler function runs as if a defer-recover preamble was added to the function on
// which the `go` operatorr is invoked:
//
// defer func() { if r := recover(); r != nil { handler(r) } }
//
// This means that, for example, the stack of the panicking go-routine can be retrieved use `debug.Stack`, etc.
func Recover(handler func(r any)) {}