Skip to content

Commit

Permalink
♿ make exception developer-friendly. related to pyexcel-webwares/Flas…
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Apr 15, 2018
1 parent 8b53c16 commit 983bb7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyexcel_io/database/importers/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,7 @@ def create_sheet(self, sheet_name):
bulk_save=self._keywords.get('bulk_save', True)
)
else:
raise Exception("No django model found!")
raise Exception(
"Sheet: %s does not match any given models." % sheet_name +
"Please be aware of case sensitivity.")
return sheet_writer
4 changes: 3 additions & 1 deletion pyexcel_io/database/importers/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,7 @@ def create_sheet(self, sheet_name):
auto_commit=self.__auto_commit
)
else:
raise Exception("No suitable database adapter found!")
raise Exception(
"Sheet: %s does not match any given tables." % sheet_name +
"Please be aware of case sensitivity.")
return sheet_writer

0 comments on commit 983bb7e

Please sign in to comment.