如果用户在尝试访问这个资源时还没有经过身份验证,那么用户会收到401状态码,应用程序可以提供一个特殊的错误处理函数来处理这种情况。
If a user is not authenticated when trying to access this resource, the user will receive a 401 status code and the application can provide a special error handler to deal with that condition.
在我们的场景中,在执行数据库操作之后,要使用另外两个函数进行错误处理。
In our exercise, you'll be using two more functions to do error processing after a database operation.
在这个程序中,我们添加了另一个用于错误处理的函数。
In this program, we add another function for error handling.
应用推荐