Added better logging when database connection fails.
This commit is contained in:
parent
395bf0d35e
commit
7242a13e51
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user