Added better logging when database connection fails.

This commit is contained in:
Jonathan Bernard 2016-02-10 03:25:14 -06:00
parent 395bf0d35e
commit 7242a13e51
2 changed files with 3 additions and 3 deletions

View File

@ -182,7 +182,7 @@ Options:
"""
# Parse arguments
let args = docopt(doc, version = "db-migrate 0.2.0")
let args = docopt(doc, version = "db-migrate 0.2.1")
let exitErr = proc(msg: string): void =
fatal("db_migrate: " & msg)
@ -230,7 +230,7 @@ Options:
let pgConn: DbConn =
try: open("", "", "", config.connectionString)
except DbError:
exitErr "Unable to connect to the database."
exitErr "Unable to connect to the database: " & getCurrentExceptionMsg()
(DbConn)(nil)
pgConn.createMigrationsTable

View File

@ -1,7 +1,7 @@
# Package
bin = @["db_migrate"]
version = "0.2.0"
version = "0.2.1"
author = "Jonathan Bernard"
description = "Simple tool to handle database migrations."
license = "BSD"