mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Split common error printing into "Error" and message with details
This commit is contained in:
parent
042fde2c79
commit
fe469e1154
@ -7,6 +7,8 @@ import (
|
||||
// CheckError checks if an error occurred (it's not nil)
|
||||
func CheckError(err error) {
|
||||
if err != nil {
|
||||
logrus.Fatal(err.Error())
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"message": err.Error(),
|
||||
}).Fatal("Error")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user