From 5577a43b51b50f4ff7137e6e7f0aa96fd2e9fc84 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Tue, 11 Nov 2014 16:13:46 -0500 Subject: [PATCH] provide additional error context --- game.go | 2 +- speck.go | 2 +- system.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/game.go b/game.go index cf2ac03..afc7f6d 100644 --- a/game.go +++ b/game.go @@ -34,7 +34,7 @@ func NewGame() *Game { connections: make(map[*Connection]bool, 32), } if err := game.Create(); err != nil { - log_error("%v", err) + log_error("unable to create game: %v", err) } return game } diff --git a/speck.go b/speck.go index 1517423..a10dce0 100644 --- a/speck.go +++ b/speck.go @@ -52,7 +52,7 @@ func parseSpeckLine(line []byte) *System { s.name = strings.TrimSpace(strings.Join(parts[7:], " ")) if g != nil { - log_error("%v", g) + log_error("unable to parse speck line: %v", g) } return s } diff --git a/system.go b/system.go index 8cb5a67..1f1c7b1 100644 --- a/system.go +++ b/system.go @@ -67,7 +67,7 @@ func (e System) Store(db *sql.DB) { (?, ?, ?, ?, ?) ;`, e.name, e.x, e.y, e.z, e.planets) if err != nil { - log_error("%v", err) + log_error("unable to store system: %v", err) } }