Catch¶
func Catch(fn func() error) (err error)
Catch executes a function and recovers from any panics, converting them to errors. Returns the function's error if any, or an error created from a recovered panic.
func Catch(fn func() error) (err error)
Catch executes a function and recovers from any panics, converting them to errors. Returns the function's error if any, or an error created from a recovered panic.