异常类无法执行 不报错

浏览:230 发布日期:2020/08/11 分类:ThinkPHP6专区
public function hello($name = 'ThinkPHP6')
{
throw new \think\Exception('异常消息', 10006);
}

unhandle \think\Exception

<?php

use app\common\exception\ApiException;
use app\Request;


// 容器Provider定义文件
return [
'think\Request' => Request::class,
'think\exception\Handle' => ApiException::class,
];
完全不起作用
最佳答案
评论( 相关
后面还有条评论,点击查看>>