Skip to content

Commit 225a893

Browse files
committed
chore: update run method to catch throwable
1 parent 9a51925 commit 225a893

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CLI/CLI.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Utopia\CLI;
44

55
use Exception;
6+
use Throwable;
67
use Utopia\CLI\Adapters\Generic;
78
use Utopia\DI\Container;
89
use Utopia\DI\Dependency;
@@ -333,7 +334,7 @@ public function run(): self
333334
} else {
334335
throw new Exception('No command found');
335336
}
336-
} catch (Exception $e) {
337+
} catch (Throwable $e) {
337338
foreach ($this->errors as $hook) {
338339
$error = new Dependency();
339340
$error->setName('error')->setCallback(fn () => $e);

0 commit comments

Comments
 (0)