MCPcopy
hub / github.com/IBM/sarama / withRecover

Function withRecover

utils.go:40–51  ·  view source on GitHub ↗
(fn func())

Source from the content-addressed store, hash-verified

38}
39
40func withRecover(fn func()) {
41 defer func() {
42 handler := PanicHandler
43 if handler != nil {
44 if err := recover(); err != nil {
45 handler(err)
46 }
47 }
48 }()
49
50 fn()
51}
52
53func safeAsyncClose(b *Broker) {
54 go withRecover(func() {

Callers 14

ConsumePartitionMethod · 0.85
newBrokerConsumerMethod · 0.85
OpenMethod · 0.85
safeAsyncCloseFunction · 0.85
newAsyncProducerFunction · 0.85
CloseMethod · 0.85
AsyncCloseMethod · 0.85
newTopicProducerMethod · 0.85
newPartitionProducerMethod · 0.85

Calls 1

handlerStruct · 0.85

Tested by 1