Skip to content

Commit

Permalink
Fix errors reporting - log wrapped errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dzeban committed Apr 22, 2019
1 parent 3ea1488 commit 9bba4b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"log"
"os"

"github.com/go-redis/redis"
Expand All @@ -13,7 +14,7 @@ import (
func exec(pipe redis.Pipeliner) {
_, err := pipe.Exec()
if err != nil {
errors.Wrap(err, "pipeline exec failed")
log.Println(errors.Wrap(err, "pipeline exec failed"))
}
}

Expand Down Expand Up @@ -64,7 +65,7 @@ func main() {
// Grab the next portion of keys
keys, cursor, err = redisdb.Scan(cursor, pattern, count).Result()
if err != nil {
errors.Wrap(err, "scan failed")
log.Println(errors.Wrap(err, "scan failed"))
break
}

Expand Down

0 comments on commit 9bba4b6

Please sign in to comment.