Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoverAndLog ¶
func RecoverInto ¶
func RecoverInto(errp *error)
RecoverInto is a function you can defer-call at the start of a function that you know has a risk of panicking.
Example ¶
package main import ( "fmt" "github.com/itchio/butler/butlerd/horror" ) func main() { f := func() (retErr error) { defer horror.RecoverInto(&retErr) panic("Oh no") } err := f() fmt.Printf("Returned from f: %+v", err) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.