Skip to content

Commit 8476e33

Browse files
committed
* Fixed duplicating WithPanicCallback proxying to table config options
* Fixed comments for `xerrros.Is` and `xerrros.As`
1 parent db6c185 commit 8476e33

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Fixed duplicating `WithPanicCallback` proxying to table config options
2+
* Fixed comments for `xerrros.Is` and `xerrros.As`
3+
14
## v3.18.4
25
* Renamed internal packages `errors`, `net` and `resolver` to `xerrors`, `xnet` and `xresolver` for excluding ambiguous interpretation
36
* Renamed internal error wrapper `xerrors.New` to `xerrors.Wrap`

internal/xerrors/xerrors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func HideEOF(err error) error {
5454
return err
5555
}
5656

57-
// As is a proxy to xerrors.As
57+
// As is a proxy to errors.As
5858
// This need to single import errors
5959
func As(err error, targets ...interface{}) bool {
6060
if err == nil {
@@ -68,7 +68,7 @@ func As(err error, targets ...interface{}) bool {
6868
return false
6969
}
7070

71-
// Is is a improved proxy to xerrors.Is
71+
// Is is a improved proxy to errors.Is
7272
// This need to single import errors
7373
func Is(err error, targets ...error) bool {
7474
if len(targets) == 0 {

options.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ func WithSessionPoolDeleteTimeout(deleteTimeout time.Duration) Option {
359359
func WithPanicCallback(panicCallback func(e interface{})) Option {
360360
return func(ctx context.Context, c *connection) error {
361361
c.panicCallback = panicCallback
362-
c.tableOptions = append(c.tableOptions, tableConfig.WithPanicCallback(panicCallback))
362+
c.discoveryOptions = append(c.discoveryOptions, discoveryConfig.WithPanicCallback(panicCallback))
363363
c.coordinationOptions = append(c.coordinationOptions, coordinationConfig.WithPanicCallback(panicCallback))
364-
c.schemeOptions = append(c.schemeOptions, schemeConfig.WithPanicCallback(panicCallback))
365364
c.ratelimiterOptions = append(c.ratelimiterOptions, ratelimiterConfig.WithPanicCallback(panicCallback))
366-
c.discoveryOptions = append(c.discoveryOptions, discoveryConfig.WithPanicCallback(panicCallback))
365+
c.schemeOptions = append(c.schemeOptions, schemeConfig.WithPanicCallback(panicCallback))
366+
c.scriptingOptions = append(c.scriptingOptions, scriptingConfig.WithPanicCallback(panicCallback))
367367
c.tableOptions = append(c.tableOptions, tableConfig.WithPanicCallback(panicCallback))
368368
return nil
369369
}

0 commit comments

Comments
 (0)