Skip to content

Commit 45fa921

Browse files
committed
multi-handler & auto-annotation documentation to Handle
1 parent c9da721 commit 45fa921

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

err2.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ var (
7979
// of them resets the error like Reset (notice other predefined error handlers)
8080
// in next sample:
8181
//
82-
// defer err2.Handle(err2.Noop, err2.Reset, err2.Log) // err2.Log not called!
82+
// defer err2.Handle(err2.Noop, err2.Log) // 2 handlers ==> annotated by err2
83+
// defer err2.Handle(nil, err2.Noop, err2.Log) // nil disables auto-annotation
8384
//
8485
// If you need to stop general panics in handler, you can do that by giving a
8586
// panic handler function:

0 commit comments

Comments
 (0)