feat:优化代码

This commit is contained in:
WangXianming
2024-09-28 14:14:14 +08:00
committed by GitHub
parent b1b7e720c0
commit 697a3769ec
13 changed files with 307 additions and 226 deletions

View File

@@ -1,5 +1,5 @@
import traceback
def stack_error(exception):
def stack_error(exception: Exception) -> str:
stack_trace = traceback.format_exception(type(exception), exception, exception.__traceback__)
return ''.join(stack_trace)
return ''.join(stack_trace)