![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
异常
子弹头99
php最好的语言
展开
-
thinkphp5异常处理,输出日志
Model<?phpnamespace app\api\model;class Banner{ public static function getBannerByID($id){ return null; }}Controller<?phpnamespace app\api\controller\v1;use app\...原创 2019-07-12 18:20:13 · 4166 阅读 · 0 评论 -
thinkphp5抛出异常,处理异常
model 返回一个null<?phpnamespace app\api\model;use think\Exception;class Banner{ public static function getBannerByID($id){ return null; }}controller 抛出异常<?phpn...原创 2019-07-12 20:10:16 · 2536 阅读 · 0 评论 -
学习小程序异常向上抛
modell<php?namespace app\api\model;use think\Exception;class Banner{ public static function getBannerByID($id){ //TODO:根据banner ID号,获取Banner信息 try{ 1 / 0;...原创 2019-07-12 14:10:07 · 303 阅读 · 0 评论