Skip to content

Commit

Permalink
The benefit of "raise" on its own is that the original stacktrace is …
Browse files Browse the repository at this point in the history
…made available, rather than creating a new stacktrace with "raise search_error". So its easier to debug.
  • Loading branch information
David Read committed Mar 30, 2016
1 parent 3bd3e2d commit 617f6e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/model/modification.py
Expand Up @@ -88,7 +88,7 @@ def notify(self, entity, operation):
log.exception(search_error)
# Reraise, since it's pretty crucial to ckan if it can't index
# a dataset
raise search_error
raise
except Exception, ex:
log.exception(ex)
# Don't reraise other exceptions since they are generally of
Expand All @@ -103,7 +103,7 @@ def notify_after_commit(self, entity, operation):
log.exception(search_error)
# Reraise, since it's pretty crucial to ckan if it can't index
# a dataset
raise search_error
raise
except Exception, ex:
log.exception(ex)
# Don't reraise other exceptions since they are generally of
Expand Down

0 comments on commit 617f6e2

Please sign in to comment.