MCPcopy Create free account
hub / github.com/sourcegraph/conc / tryRecover

Method tryRecover

panics/panics.go:26–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26func (p *Catcher) tryRecover() {
27 if val := recover(); val != nil {
28 rp := NewRecovered(1, val)
29 p.recovered.CompareAndSwap(nil, &rp)
30 }
31}
32
33// Repanic panics if any calls to Try caught a panic. It will panic with the
34// value of the first panic caught, wrapped in a panics.Recovered with caller

Callers 1

TryMethod · 0.95

Calls 1

NewRecoveredFunction · 0.85

Tested by

no test coverage detected