我正在使用Laravel5开发一个RESTful应用程序,我正在trycatch异常并生成适当的响应。我也在使用tymondesigns/jwt-auth打包,以便所有API响应都采用JSendJSON格式。当然,现在我正在trycatchTokenExpiredException,它在给定token过期时出现。所以我在Handler.php中尝试了这个:if($einstanceofTokenExpiredException){returnjsend()->error()->message("TokenExpired")->code(403)->data([null])->get()