Merge "Correct higgins reraising of exception"
This commit is contained in:
commit
47f3581d2b
@ -192,17 +192,17 @@ class ZunException(Exception):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.message = self.message % kwargs
|
self.message = self.message % kwargs
|
||||||
except Exception as e:
|
except KeyError:
|
||||||
# kwargs doesn't match a variable in the message
|
# kwargs doesn't match a variable in the message
|
||||||
# log the issue and the kwargs
|
# log the issue and the kwargs
|
||||||
LOG.exception(_LE('Exception in string format operation, '
|
LOG.exception(_LE('Exception in string format operation, '
|
||||||
'kwargs: %s') % kwargs)
|
'kwargs: %s') % kwargs)
|
||||||
try:
|
try:
|
||||||
if CONF.fatal_exception_format_errors:
|
ferr = CONF.fatal_exception_format_errors
|
||||||
raise e
|
|
||||||
except cfg.NoSuchOptError:
|
except cfg.NoSuchOptError:
|
||||||
if CONF.oslo_versionedobjects.fatal_exception_format_errors:
|
ferr = CONF.oslo_versionedobjects.fatal_exception_format_errors
|
||||||
raise e
|
if ferr:
|
||||||
|
raise
|
||||||
|
|
||||||
super(ZunException, self).__init__(self.message)
|
super(ZunException, self).__init__(self.message)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user