Correct castellan 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: I121c004082d37a5af1671060e3bdf6655ebeffc2
This commit is contained in:
gengchc2 2016-08-26 15:29:54 +08:00
parent 4cb769a8a2
commit 9bed38d12c

View File

@ -43,9 +43,9 @@ class CastellanException(Exception):
message_arg = self.message
try:
self.message = message_arg % kwargs
except Exception as e:
except Exception:
if _FATAL_EXCEPTION_FORMAT_ERRORS:
raise e
raise
else:
# at least get the core message out if something happened
pass