Skip to content

Commit 1d77504

Browse files
authored
Fix stack depth (#1849)
* fix stacktrace depth * CHANGELOG.md
1 parent 1d4f868 commit 1d77504

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fixed depth for `pkg/xerrors.WithStackTrace()` error
2+
13
## v3.114.0
24
* Added public packages:
35
- `pkg/xerrors` - helpers for wrap errors with stacktrace and join errors

pkg/xerrors/stacktrace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package xerrors
33
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
44

55
func WithStackTrace(err error, opts ...xerrors.WithStackTraceOption) error {
6-
return xerrors.WithStackTrace(err, opts...)
6+
return xerrors.WithStackTrace(err, append(opts, WithSkipDepth(1))...)
77
}
88

99
func WithSkipDepth(skipDepth int) xerrors.WithStackTraceOption {

0 commit comments

Comments
 (0)