From 617f6e2ebb7a3d7b2d6fc70633015e2979e2b05f Mon Sep 17 00:00:00 2001 From: David Read Date: Wed, 30 Mar 2016 14:14:56 +0000 Subject: [PATCH] The benefit of "raise" on its own is that the original stacktrace is made available, rather than creating a new stacktrace with "raise search_error". So its easier to debug. --- ckan/model/modification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckan/model/modification.py b/ckan/model/modification.py index c06c72902b9..a7be9c37f51 100644 --- a/ckan/model/modification.py +++ b/ckan/model/modification.py @@ -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 @@ -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