Log original dropped exception when a new exception occurs

If a exception is caught while processing a previous exception, make sure
to log it so it doesn't silently get discarded

Change-Id: Ic887db9c2592229970737daf5dd9732b2258877b
This commit is contained in:
Johannes Erdfelt
2011-10-31 15:11:36 +00:00
parent 514ccbbfbd
commit 269da980d4
2 changed files with 16 additions and 8 deletions

View File

@@ -107,6 +107,8 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None,
# TODO(sandy): Find a way to import nova.notifier.api so we don't have
# to pass it in as a parameter. Otherwise we get a cyclic import of
# nova.notifier.api -> nova.utils -> nova.exception :(
# TODO(johannes): Also, it would be nice to use
# utils.save_and_reraise_exception() without an import loop
def inner(f):
def wrapped(*args, **kw):
try: