From 0c5c6e68c2c22333ac44df3371f9adaa5f8c26b0 Mon Sep 17 00:00:00 2001 From: haomingming Date: Fri, 31 Jul 2026 13:34:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/TestController.php | 5 +++++ config/routes.php | 1 + 2 files changed, 6 insertions(+) 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']);