(f func())
| 403 | } |
| 404 | |
| 405 | func (l *State) protect(f func()) (err error) { |
| 406 | nestedGoCallCount, protectFunction := l.nestedGoCallCount, l.protectFunction |
| 407 | l.protectFunction = func() { |
| 408 | if e := recover(); e != nil { |
| 409 | err = e.(error) |
| 410 | l.nestedGoCallCount, l.protectFunction = nestedGoCallCount, protectFunction |
| 411 | } |
| 412 | } |
| 413 | defer l.protectFunction() |
| 414 | f() |
| 415 | l.nestedGoCallCount, l.protectFunction = nestedGoCallCount, protectFunction |
| 416 | return err |
| 417 | } |
| 418 | |
| 419 | func (l *State) hook(event, line int) { |
| 420 | if l.hooker == nil || !l.allowHook { |
no outgoing calls
no test coverage detected