Skip to content

Commit

Permalink
Revert "Reporting errors correctly."
Browse files Browse the repository at this point in the history
This reverts commit 7ecf4bd.
  • Loading branch information
Ian Byrd committed Dec 19, 2017
1 parent 7ecf4bd commit a629ec5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package telebot

import (
"encoding/json"
"fmt"
"strconv"

"github.com/pkg/errors"
)

func (b *Bot) debug(err error) {
if b.reporter != nil {
b.reporter(err)
b.reporter(errors.WithStack(err))
}
}

Expand All @@ -18,7 +19,7 @@ func (b *Bot) deferDebug() {
if err, ok := r.(error); ok {
b.debug(err)
} else if str, ok := r.(string); ok {
b.debug(errors.Errorf("%s", str))
b.debug(fmt.Errorf("%s", str))
}
}
}
Expand Down

0 comments on commit a629ec5

Please sign in to comment.