2
0
Matt Bolt 6 жил өмнө
parent
commit
4ed9929e9e

+ 2 - 1
pkg/errors/panic.go

@@ -43,7 +43,8 @@ var (
 	dispatcher = make(chan Panic)
 	dispatcher = make(chan Panic)
 )
 )
 
 
-// SetPanicHandler sets the handler that is executed when
+// SetPanicHandler sets the handler that is executed when any panic is captured by
+// HandlePanic(). Without setting a handler, the panic reporting is disabled.
 func SetPanicHandler(handler PanicHandler) error {
 func SetPanicHandler(handler PanicHandler) error {
 	if enabled {
 	if enabled {
 		return fmt.Errorf("Panic Handler has already been set")
 		return fmt.Errorf("Panic Handler has already been set")