When a teardown function was called because of an unhandled exception
it will be passed an error object. If an :meth:errorhandler is
registered, it will handle the exception and the teardown will not
receive it.
所以e指的是error对象,默认为None。您可以了解有关注册错误处理程序at this link的更多信息。你知道吗
您将在教程中注意到,在
init_app
函数中,close_db
作为参数传递给app.teardown_appcontext()
。你知道吗从
teardown_appcontext
的docstring:所以
e
指的是error对象,默认为None。您可以了解有关注册错误处理程序at this link的更多信息。你知道吗相关问题 更多 >
编程相关推荐