mirror of https://github.com/apache/cloudstack.git
marvin: fix exception logging (#5401)
Fixes #5203 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
3d16584fa6
commit
10c49a6ad3
|
|
@ -58,7 +58,12 @@ class internalError(Exception):
|
|||
|
||||
def GetDetailExceptionInfo(e):
|
||||
if e is not None:
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
if type(e) is str:
|
||||
return e
|
||||
elif type(e) is tuple:
|
||||
(exc_type, exc_value, exc_traceback) = e
|
||||
else:
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
return str(repr(traceback.format_exception(
|
||||
exc_type, exc_value, exc_traceback)))
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue