FailOn logs the error information (terminates the application)
(err error)
| 28 | |
| 29 | // FailOn logs the error information (terminates the application) |
| 30 | func FailOn(err error) { |
| 31 | if err != nil { |
| 32 | stackData := debug.Stack() |
| 33 | log.WithError(err).WithFields(log.Fields{ |
| 34 | "version": version.Current(), |
| 35 | "stack": string(stackData), |
| 36 | }).Fatal("slim: failure") |
| 37 | |
| 38 | showCommunityInfo() |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | // WarnOn logs the error information as a warning |
| 43 | func WarnOn(err error) { |
no test coverage detected