Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Log when panicOnError() is called.
Browse files Browse the repository at this point in the history
panic() logs the stacktrace to stderr. Have a trace of the event
in syslogs can be helpful.
  • Loading branch information
alokmenghrajani committed Apr 18, 2016
1 parent b6ca78e commit 24caa2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Expand Up @@ -160,6 +160,7 @@ func lockMemory() {
// Helper function to panic on error
func panicOnError(err error) {
if err != nil {
logger.Errorf("panic: %v", err)
panic(err)
}
}

0 comments on commit 24caa2a

Please sign in to comment.