Browse Source

change error messages

master
Joop Kiefte 2 years ago
parent
commit
c56acf2fba
  1. 4
      main.go

4
main.go

@ -14,7 +14,7 @@ func main() { @@ -14,7 +14,7 @@ func main() {
rand.Seed(time.Now().UnixNano())
db, err := sql.Open("sqlite", "prayers.db")
if err != nil {
fmt.Println("put prayers.db alongside the binary: "+ err.Error())
fmt.Println("error loading database driver: "+ err.Error())
os.Exit(1)
}
langcode := "en"
@ -23,7 +23,7 @@ func main() { @@ -23,7 +23,7 @@ func main() {
}
rows, err := db.Query("select text, author from prayers where language = ?", langcode)
if err != nil {
fmt.Println("database query failed: " +err.Error())
fmt.Println("database query failed (is prayers.db in your current directory?): " +err.Error())
os.Exit(2)
}
var prayers []string

Loading…
Cancel
Save