🔊 Write panic logs to journals

This commit is contained in:
Maxim Lebedev 2018-01-25 17:25:54 +05:00
parent 7c6aa96eff
commit 4dfb50b346
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
1 changed files with 3 additions and 0 deletions

View File

@ -1,8 +1,11 @@
package main
import "fmt"
// errCheck helps debug critical errors without warnings from 'gocyclo' linter
func errCheck(err error) {
if err != nil {
fmt.Sprintln(err.Error())
waitForwards.Wait() // Wait what all users get announcement message
panic(err.Error())
}