Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
wln32 committed Dec 22, 2024
1 parent 5432b87 commit 34e6d3d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions errors/gerror/gerror_error_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ func (err *Error) Stack() string {
temp = x.error
default:
temp = nil
count += len(x.Error()) + len("\n")
e := x.Error()
count += len(e) + len("\n")
stackInfos = append(stackInfos, stackInfo{
bufs: nil,
errLine: []byte(x.Error()),
errLine: []byte(e),
count: 0,
})
}
Expand Down Expand Up @@ -93,10 +94,11 @@ func (err *Error) stackWithBuffer(buffer *bytes.Buffer, errError string) {
temp = x.error
default:
temp = nil
count += len(x.Error()) + len("\n")
e := x.Error()
count += len(e) + len("\n")
stackInfos = append(stackInfos, stackInfo{
bufs: nil,
errLine: []byte(x.Error()),
errLine: []byte(e),
count: 0,
})
}
Expand Down

0 comments on commit 34e6d3d

Please sign in to comment.