]> BookStack Code Mirror - system-cli/blobdiff - scripts/run
Extracted program running to its own class
[system-cli] / scripts / run
index 6f1d20567d6a557fe674313a50c775a104e423a8..fb7e23ce646d5246ad9914bd3a0759e2289782dd 100644 (file)
@@ -8,7 +8,6 @@ if (php_sapi_name() !== 'cli') {
 require __DIR__ . '/vendor/autoload.php';
 
 use Cli\Commands\BackupCommand;
-use Cli\Commands\CommandError;
 use Cli\Commands\InitCommand;
 use Minicli\App;
 
@@ -33,7 +32,7 @@ $app->registerCommand('init', [new InitCommand(), 'handle']);
 
 try {
     $app->runCommand($argv);
-} catch (CommandError $error) {
+} catch (Exception $error) {
     fwrite(STDERR, "An error occurred when attempting to run a command:\n");
     fwrite(STDERR, $error->getMessage() . "\n");
     exit(1);