Skip to content

Commit

Permalink
Merge pull request #523 from sjlongland/callback_exception
Browse files Browse the repository at this point in the history
pika: callback: Display exception message when callback fails.
  • Loading branch information
gmr committed Apr 29, 2015
2 parents d235989 + 562aa15 commit 5640d03
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pika/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ def process(self, prefix, key, caller, *args, **keywords):
# Call each callback
for callback in callbacks:
LOGGER.debug('Calling %s for "%s:%s"', callback, prefix, key)
callback(*args, **keywords)
try:
callback(*args, **keywords)
except:
LOGGER.exception('Calling %s for "%s:%s" failed',
callback, prefix, key)
raise
return True

@sanitize_prefix
Expand Down

0 comments on commit 5640d03

Please sign in to comment.