Another small logging fix
This commit is contained in:
parent
aafb72f307
commit
e953ccac80
@ -39,6 +39,9 @@ def debug(message):
|
|||||||
|
|
||||||
def get_exception_traceback_str(exc: Exception) -> str:
|
def get_exception_traceback_str(exc: Exception) -> str:
|
||||||
# Ref: https://stackoverflow.com/a/76584117/
|
# Ref: https://stackoverflow.com/a/76584117/
|
||||||
file = StringIO()
|
try:
|
||||||
traceback.print_exception(exc, file=file)
|
file = StringIO()
|
||||||
return file.getvalue().rstrip()
|
traceback.print_exception(exc, file=file)
|
||||||
|
return file.getvalue().rstrip()
|
||||||
|
except:
|
||||||
|
return str(exc)
|
Loading…
x
Reference in New Issue
Block a user