trackback 捕获异常并打印

### 1


except Exception as e:
print(traceback.format_exc())

def _handle_thread_exception(request, exc_info):
    """默认的异常处理函数,只是简单的打印"""
    traceback.print_exception(*exc_info)
原文地址:https://www.cnblogs.com/wangjiale1024/p/10192404.html