Skip to content

Commit

Permalink
stack backtrace: fix skipping (#600)
Browse files Browse the repository at this point in the history
The full backtrace included one entry too many. This only mattered
when that entry wasn't in Ginkgo itself, because otherwise pruning
removed it.
  • Loading branch information
pohly authored and blgm committed Aug 30, 2019
1 parent f90f37d commit 2a4c0bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/codelocation/code_location.go
Expand Up @@ -11,7 +11,7 @@ import (

func New(skip int) types.CodeLocation {
_, file, line, _ := runtime.Caller(skip + 1)
stackTrace := PruneStack(string(debug.Stack()), skip)
stackTrace := PruneStack(string(debug.Stack()), skip+1)
return types.CodeLocation{FileName: file, LineNumber: line, FullStackTrace: stackTrace}
}

Expand Down

0 comments on commit 2a4c0bd

Please sign in to comment.