marvin: fix exception logging (#5401)

Fixes #5203

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2021-09-08 10:12:05 +05:30 committed by GitHub
parent 3d16584fa6
commit 10c49a6ad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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: