provide additional error context

slack
Jordan Orelli 10 years ago
parent b74958efbd
commit 5577a43b51

@ -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
}

@ -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
}

@ -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)
}
}

Loading…
Cancel
Save