summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/exception.py b/nova/exception.py
index 68cf1f991..002e47a38 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -25,6 +25,7 @@ SHOULD include dedicated exception logging.
"""
import functools
+import sys
from oslo.config import cfg
import webob.exc
@@ -127,7 +128,8 @@ class NovaException(Exception):
try:
message = self.message % kwargs
- except Exception as e:
+ except Exception:
+ exc_info = sys.exc_info()
# kwargs doesn't match a variable in the message
# log the issue and the kwargs
LOG.exception(_('Exception in string format operation'))
@@ -135,7 +137,7 @@ class NovaException(Exception):
LOG.error("%s: %s" % (name, value))
if CONF.fatal_exception_format_errors:
- raise e
+ raise exc_info[0], exc_info[1], exc_info[2]
else:
# at least get the core message out if something happened
message = self.message