diff --git a/ergonomadic.go b/ergonomadic.go index 525e38ac..15504e55 100644 --- a/ergonomadic.go +++ b/ergonomadic.go @@ -18,7 +18,7 @@ func main() { if *passwd != "" { encoded, err := irc.GenerateEncodedPassword(*passwd) if err != nil { - log.Fatal(err) + log.Fatal("encoding error: ", err) } fmt.Println(encoded) return @@ -26,11 +26,11 @@ func main() { config, err := irc.LoadConfig(*conf) if err != nil { - log.Fatal(err) + log.Fatal("error loading config: ", err) } err = os.Chdir(filepath.Dir(*conf)) if err != nil { - log.Fatal(err) + log.Fatal("chdir error: ", err) } if *initdb { diff --git a/irc/config.go b/irc/config.go index 34181acd..6c5aa14d 100644 --- a/irc/config.go +++ b/irc/config.go @@ -13,7 +13,7 @@ type PassConfig struct { func (conf *PassConfig) PasswordBytes() []byte { bytes, err := DecodePassword(conf.Password) if err != nil { - log.Fatal(err) + log.Fatal("decode password error: ", err) } return bytes } diff --git a/irc/database.go b/irc/database.go index 1ff3bd67..c7f9264a 100644 --- a/irc/database.go +++ b/irc/database.go @@ -19,14 +19,14 @@ func InitDB(path string) { topic TEXT NOT NULL, user_limit INTEGER DEFAULT 0)`) if err != nil { - log.Fatal(err) + log.Fatal("initdb error: ", err) } } func OpenDB(path string) *sql.DB { db, err := sql.Open("sqlite3", path) if err != nil { - log.Fatal(err) + log.Fatal("open db error: ", err) } return db } diff --git a/irc/server.go b/irc/server.go index 129a312b..ef2302ff 100644 --- a/irc/server.go +++ b/irc/server.go @@ -66,7 +66,7 @@ func (server *Server) loadChannels() { SELECT name, flags, key, topic, user_limit FROM channel`) if err != nil { - log.Fatal(err) + log.Fatal("error loading channels: ", err) } for rows.Next() { var name, flags, key, topic string