Skip to content

Commit 845ff52

Browse files
committed
chore: update run method to catch throwable
1 parent d69bbe5 commit 845ff52

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\Hook;
78
use Utopia\Validator;
89

@@ -325,7 +326,7 @@ public function run(): self
325326
} else {
326327
throw new Exception('No command found');
327328
}
328-
} catch (Exception $e) {
329+
} catch (Throwable $e) {
329330
foreach ($this->errors as $hook) {
330331
self::setResource('error', fn () => $e);
331332
\call_user_func_array($hook->getAction(), $this->getParams($hook));

0 commit comments

Comments
 (0)