Skip to content

Commit

Permalink
handle more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Thegaram committed Sep 11, 2023
1 parent 2f26dc3 commit 708659f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,14 @@ func traceTx(ctx *cli.Context) error {

// write traces to file
tracesJson, err := json.Marshal(traces)
os.WriteFile(tracesFile, tracesJson, 0644)
if err != nil {
log.Crit("Failed to marshal traces", "err", err)
}

err = os.WriteFile(tracesFile, tracesJson, 0644)
if err != nil {
log.Crit("Failed to write traces to file", "file", tracesFile, "err", err)
}

return nil
}
Expand Down

0 comments on commit 708659f

Please sign in to comment.