File tree Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 1+ * Added stacktrace to errors with issues
2+
13## v3.16.10
24* Refactored ` cluster.Cluster ` and ` balancer.Balancer ` interfaces (removed ` Update ` method)
35* Replaced ` cluster.Update ` with ` cluster.Remove ` and ` cluster.Insert ` calls
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ func (c *cluster) Close(ctx context.Context) (err error) {
239239 }
240240
241241 if len (issues ) > 0 {
242- return errors .NewWithIssues ("cluster closed with issues" , issues ... )
242+ return errors .WithStackTrace ( errors . NewWithIssues ("cluster closed with issues" , issues ... ) )
243243 }
244244
245245 return nil
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ func (c *conn) Release(ctx context.Context) (err error) {
8080 }
8181
8282 if len (issues ) > 0 {
83- return errors .NewWithIssues ("conn released with issues" , issues ... )
83+ return errors .WithStackTrace ( errors . NewWithIssues ("conn released with issues" , issues ... ) )
8484 }
8585
8686 return nil
Original file line number Diff line number Diff line change @@ -495,10 +495,7 @@ func (c *client) Close(ctx context.Context) (err error) {
495495 c .wgClosed .Wait ()
496496
497497 if len (issues ) > 0 {
498- return errors .WithStackTrace (errors .NewWithIssues (
499- "table client closed with issues" ,
500- issues ... ,
501- ))
498+ return errors .WithStackTrace (errors .NewWithIssues ("table client closed with issues" , issues ... ))
502499 }
503500
504501 return nil
Original file line number Diff line number Diff line change @@ -86,10 +86,13 @@ func WithConnectionString(connectionString string) Option {
8686 }
8787 issues = append (issues , err )
8888 }
89- return errors .NewWithIssues (
90- "parse connection string '" + connectionString + "' failed:" ,
91- issues ... ,
92- )
89+ if len (issues ) > 0 {
90+ return errors .WithStackTrace (errors .NewWithIssues (
91+ "parse connection string '" + connectionString + "' failed:" ,
92+ issues ... ,
93+ ))
94+ }
95+ return nil
9396 }
9497}
9598
You can’t perform that action at this time.
0 commit comments