Skip to content

Commit

Permalink
Merge branch 'master' into child-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 committed Jan 12, 2018
2 parents c028229 + c943d2a commit 1a1a30b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions internal/internal_event_handlers.go
Expand Up @@ -437,6 +437,18 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessEvent(
if event == nil {
return nil, errors.New("nil event provided")
}
defer func() {
if p := recover(); p != nil {
weh.metricsScope.Counter(metrics.DecisionTaskPanicCounter).Inc(1)
topLine := fmt.Sprintf("process event for %s [panic]:", weh.workflowInfo.TaskListName)
st := getStackTraceRaw(topLine, 7, 0)
weh.logger.Error("ProcessEvent panic.",
zap.String("PanicError", fmt.Sprintf("%v", p)),
zap.String("PanicStack", st))

weh.Complete(nil, newPanicError(p, st))
}
}()

weh.isReplay = isReplay
traceLog(func() {
Expand Down

0 comments on commit 1a1a30b

Please sign in to comment.