Skip to content

Commit 0de04f1

Browse files
authored
docs: update the comment on Options.PanicHandler to match its behavior (#365)
Fixes #364
1 parent a445942 commit 0de04f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

options.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ type Options struct {
5555
Nonblocking bool
5656

5757
// PanicHandler is used to handle panics from each worker goroutine.
58-
// if nil, panics will be thrown out again from worker goroutines.
58+
// If nil, the default behavior is to capture the value given to panic
59+
// and resume normal execution and print that value along with the
60+
// stack trace of the goroutine
5961
PanicHandler func(any)
6062

6163
// Logger is the customized logger for logging info, if it is not set,
@@ -66,7 +68,7 @@ type Options struct {
6668
DisablePurge bool
6769
}
6870

69-
// WithOptions accepts the whole options config.
71+
// WithOptions accepts the whole Options config.
7072
func WithOptions(options Options) Option {
7173
return func(opts *Options) {
7274
*opts = options

0 commit comments

Comments
 (0)