♿ make exception developer-friendly. related to https://github.com/pyexcel-webwares/Flask-Excel/issues/31
This commit is contained in:
parent
8b53c1689b
commit
983bb7e013
|
@ -74,5 +74,7 @@ class DjangoBookWriter(BookWriter):
|
|||
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
|
||||
|
|
|
@ -89,5 +89,7 @@ class SQLBookWriter(BookWriter):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue