Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Hot fix for CatchTrace
Browse files Browse the repository at this point in the history
Loop should be marked and `break` call with this mark

Signed-off-by: Evgeniy Kulikov <[email protected]>
  • Loading branch information
im-kulikov committed Sep 18, 2019
1 parent 00e2cf2 commit 3f4d010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helium.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func CatchTrace(err error) {
}

// digging into the root of the problem
loop:
for {
var (
ok bool
Expand All @@ -136,7 +137,7 @@ func CatchTrace(err error) {
switch {
case v.Type().Kind() != reflect.Struct,
!v.FieldByName("Reason").IsValid():
break
break loop
case v.FieldByName("Func").IsValid():
fn = v.FieldByName("Func")
}
Expand Down

0 comments on commit 3f4d010

Please sign in to comment.