Skip to content

Commit

Permalink
Merge pull request #206 from michaelnt/error-reporting
Browse files Browse the repository at this point in the history
Report the item id that generated the exception
  • Loading branch information
jacebrowning committed Jun 20, 2016
2 parents a731d1b + c7aecce commit f73b584
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doorstop/core/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ def _iter(self, reload=False):
else:
self._items.append(item)
if reload:
item.load(reload=reload)
try:
item.load(reload=reload)
except Exception:
log.error("Unable to load: %s", item)
raise
if settings.CACHE_ITEMS and self.tree:
self.tree._item_cache[item.uid] = item # pylint: disable=W0212
log.trace("cached item: {}".format(item))
Expand Down

0 comments on commit f73b584

Please sign in to comment.