Updated connection exception to provide more info on the cause.
Fixes #178
This commit is contained in:
parent
3246cf8bdd
commit
3861103585
1 changed files with 2 additions and 2 deletions
|
|
@ -31,8 +31,8 @@ def _get_connection(reconnect=False):
|
|||
if _connection.get(identity) is None or reconnect:
|
||||
try:
|
||||
_connection[identity] = Connection(**_connection_settings)
|
||||
except:
|
||||
raise ConnectionError('Cannot connect to the database')
|
||||
except Exception, e:
|
||||
raise ConnectionError("Cannot connect to the database:\n%s" % e)
|
||||
return _connection[identity]
|
||||
|
||||
def _get_db(reconnect=False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue