Skip to content

Commit

Permalink
More verbose error message
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncoulton committed Mar 8, 2016
1 parent 1cae974 commit 2a778fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion watson/db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = '2.1.0'
__version__ = '2.1.1'
6 changes: 5 additions & 1 deletion watson/db/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ def metadata(self):
for name, options in self.config['connections'].items():
metadata = options['metadata']
if isinstance(metadata, str):
metadata = imports.load_definition_from_string(metadata)
try:
metadata = imports.load_definition_from_string(metadata)
except:
raise ConsoleError(
'Missing connection metadata for {}'.format(metadata))
metadatas[name] = metadata
return metadatas

Expand Down

0 comments on commit 2a778fe

Please sign in to comment.