Skip to content

Commit d2a45f7

Browse files
committed
try catch
1 parent 9b26858 commit d2a45f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Console/StatusCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ private function getProjectClasses(): array
9292
$configFiles = Finder::create()->files()->name('*.php')->notName('*.blade.php')->in(app()->path());
9393

9494
foreach ($configFiles->files() as $file) {
95-
require_once $file;
95+
try {
96+
require_once $file;
97+
} catch (\Throwable $e) {
98+
//skiping if the file cannot be loaded
99+
}
100+
96101
}
97102

98103
self::$declaredClasses = get_declared_classes();

0 commit comments

Comments
 (0)