Documentation
¶
Overview ¶
Package paniccatcher package exposes a set of utility structures and methods that support standardized panic catching and handling.
Example ¶
Example is a very simple example of how to use Catch to recover from a panic and log its stack trace.
Do(func() {
fmt.Println("Doing something...")
panic("Something wrong happened!")
}, func(p *Panic) {
fmt.Println("Caught a panic:", p.Reason)
})
Output: Doing something... Caught a panic: Something wrong happened!
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Source Files
¶
- catch.go
- doc.go
Click to show internal directories.
Click to hide internal directories.