Skip to content

Commit

Permalink
feat: add primitive.DefaultPanicHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
twz915 committed Dec 12, 2024
1 parent bac8881 commit dc36a37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consumer/push_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,9 @@ func (pc *pushConsumer) consumeMessageConcurrently(pq *processQueue, mq *primiti
go primitive.WithRecover(func() {
defer func() {
if err := recover(); err != nil {
if primitive.DefaultPanicHandler != nil {
primitive.DefaultPanicHandler(err)
}
rlog.Error("consumeMessageConcurrently panic", map[string]interface{}{
rlog.LogKeyUnderlayError: err,
rlog.LogKeyStack: utils.GetStackAsString(false),
Expand Down

0 comments on commit dc36a37

Please sign in to comment.