■ ■ ■ ■ ■ ■
pkg/detectors/detectors.go
| skipped 2 lines |
3 | 3 | | import ( |
4 | 4 | | "fmt" |
5 | 5 | | "path/filepath" |
6 | | - | "runtime/debug" |
7 | 6 | | |
8 | 7 | | "github.com/bearer/bearer/new/scanner" |
9 | 8 | | "github.com/bearer/bearer/pkg/commands/process/settings" |
| skipped 166 lines |
176 | 175 | | func(file *file.FileInfo) error { |
177 | 176 | | recovery := func() { |
178 | 177 | | if r := recover(); r != nil { |
179 | | - | log.Printf("error recovered %s %s", r, debug.Stack()) |
180 | | - | report.AddError(file.Path.RelativePath, fmt.Errorf("skipping file: due to panic %s, %s", r, string(debug.Stack()))) |
| 178 | + | log.Printf("file %s -> error recovered %s", file.AbsolutePath, r) |
| 179 | + | report.AddError(file.Path.RelativePath, fmt.Errorf("skipping file: due to panic %s", r)) |
181 | 180 | | } |
182 | 181 | | } |
183 | 182 | | defer recovery() |
| skipped 54 lines |