We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f757184 + 4d12177 commit 4ae507aCopy full SHA for 4ae507a
internal/common/log.go
@@ -112,6 +112,19 @@ func DecodeLogs(chainId string, logs []Log) []*DecodedLog {
112
for idx, eventLog := range logs {
113
wg.Add(1)
114
go func(idx int, eventLog Log, mut *sync.Mutex) {
115
+ defer func() {
116
+ if err := recover(); err != nil {
117
+ log.Error().
118
+ Any("chainId", chainId).
119
+ Any("Logs", logs).
120
+ Int("logIndex", idx).
121
+ Str("logAddress", eventLog.Address).
122
+ Str("logTopic0", eventLog.Topic0).
123
+ Err(fmt.Errorf("%v", err)).
124
+ Msg("Caught panic in DecodeLogs, possibly in decodeLogFunc")
125
+ }
126
+ decodedLogs[idx] = &DecodedLog{Log: eventLog}
127
+ }()
128
defer wg.Done()
129
decodedLog := decodeLogFunc(&eventLog, mut)
130
decodedLogs[idx] = decodedLog
0 commit comments