diff --git a/app/Controller/TestController.php b/app/Controller/TestController.php index 762ad0a..7413f6f 100644 --- a/app/Controller/TestController.php +++ b/app/Controller/TestController.php @@ -89,6 +89,11 @@ class TestController extends AbstractController // 疾病名称 protected string $icd_name; + public function testError() + { + throw new BusinessException("测试Docker日志报错:这是一个测试异常!"); + } + public function test(){ // $this->test_8(); // $this->test_3(); diff --git a/config/routes.php b/config/routes.php index 6b23d14..1ffdbde 100644 --- a/config/routes.php +++ b/config/routes.php @@ -912,6 +912,7 @@ Router::addGroup('/case', function () { // 测试使用 Router::addGroup('/test', function () { Router::get('', [TestController::class, 'test']); + Router::get('/error', [TestController::class, 'testError']); // 获取未接诊的医生 Router::get('/uninquiry', [TestController::class, 'uninquiry']);