Skip to content

Commit

Permalink
Print DAO error in end blocker
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitryhil committed Oct 6, 2022
1 parent 3c94f23 commit b8c0880
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/dao/abci.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dao

import (
"fmt"
"runtime/debug"
"time"

"github.com/cosmos/cosmos-sdk/telemetry"
Expand All @@ -16,7 +16,8 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker)

if err := endBlocker(ctx, k); err != nil {
panic(fmt.Sprintf("%s EndBlocker, %v", types.ModuleName, err))
k.Logger(ctx).Error("dao EndBlocker error: %v", err)
debug.PrintStack()
}
}

Expand Down

0 comments on commit b8c0880

Please sign in to comment.