mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-13 12:33:14 +02:00
15 lines
488 B
Go
15 lines
488 B
Go
package runtime
|
|
|
|
import log "github.com/sirupsen/logrus"
|
|
|
|
// accepts error and logs error message. Used to prevent warnings when errors not caught.
|
|
func IgnoreError(err error) {
|
|
if err != nil {
|
|
log.WithFields(log.Fields{"module": "[ERROR]", "error": err.Error()}).Errorf("catching ignored error")
|
|
}
|
|
}
|
|
func IgnoreErrorMultiReturn(i interface{}, err error) {
|
|
if err != nil {
|
|
log.WithFields(log.Fields{"module": "[ERROR]", "error": err.Error()}).Errorf("catching ignored error")
|
|
}
|
|
}
|