From cdd8644419190978171e38f6ebbdbf487186c949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 16 Apr 2023 00:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-engine/Scanner.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kiri-engine/Scanner.php b/kiri-engine/Scanner.php index 04c8ff58..0612b11d 100644 --- a/kiri-engine/Scanner.php +++ b/kiri-engine/Scanner.php @@ -35,8 +35,9 @@ class Scanner extends Component $container = Container::instance(); foreach ($this->files as $file) { $class = $namespace . '\\' . $this->rename($file); - if (!file_exists($class)) { - throw new Exception('Please follow the PSR-4 specification to write code.' . $class); + if (file_exists($class)) { + error('Please follow the PSR-4 specification to write code.' . $class); + continue; } $container->parse($class); }