Correct watcher reraising of exception
When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised Change-Id: I662583cd3cda2424d5a510cae7e815c97a51c2fe
This commit is contained in:
@@ -86,7 +86,7 @@ class WatcherException(Exception):
|
||||
if not message:
|
||||
try:
|
||||
message = self.msg_fmt % kwargs
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
# kwargs doesn't match a variable in msg_fmt
|
||||
# log the issue and the kwargs
|
||||
LOG.exception(_LE('Exception in string format operation'))
|
||||
@@ -95,7 +95,7 @@ class WatcherException(Exception):
|
||||
{'name': name, 'value': value})
|
||||
|
||||
if CONF.fatal_exception_format_errors:
|
||||
raise e
|
||||
raise
|
||||
else:
|
||||
# at least get the core msg_fmt out if something happened
|
||||
message = self.msg_fmt
|
||||
|
||||
Reference in New Issue
Block a user