改进控制器不存在的错误提示

This commit is contained in:
thinkphp
2016-08-23 12:31:59 +08:00
parent 69b62af4ec
commit 7008e485c2

View File

@@ -333,7 +333,7 @@ class App
try {
$instance = Loader::controller($controller, $config['url_controller_layer'], $config['controller_suffix'], $config['empty_controller']);
if (is_null($instance)) {
throw new HttpException(404, 'controller not exists:' . $controller);
throw new HttpException(404, 'controller not exists:' . Loader::parseName($controller, 1));
}
// 获取当前操作名
$action = $actionName . $config['action_suffix'];