Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Command/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Cake\Console\ConsoleOptionParser;
use Cake\Event\EventDispatcherTrait;
use DateTime;
use Exception;
use LogicException;
use Migrations\Config\ConfigInterface;
use Migrations\Migration\ManagerFactory;
Expand Down Expand Up @@ -170,11 +169,6 @@ protected function executeMigrations(Arguments $args, ConsoleIo $io): ?int
$manager->migrate($version, $fake, $count);
}
$end = microtime(true);
} catch (Exception $e) {
$io->err('<error>' . $e->getMessage() . '</error>');
$io->verbose($e->getTraceAsString());

return self::CODE_ERROR;
} catch (Throwable $e) {
$io->err('<error>' . $e->getMessage() . '</error>');
$io->verbose($e->getTraceAsString());
Expand Down
6 changes: 0 additions & 6 deletions src/Command/RollbackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Cake\Console\ConsoleOptionParser;
use Cake\Event\EventDispatcherTrait;
use DateTime;
use Exception;
use InvalidArgumentException;
use LogicException;
use Migrations\Config\ConfigInterface;
Expand Down Expand Up @@ -183,11 +182,6 @@ protected function executeMigrations(Arguments $args, ConsoleIo $io): ?int
$manager->rollback($target, $force, $targetMustMatch, $fake);
}
$end = microtime(true);
} catch (Exception $e) {
$io->err('<error>' . $e->getMessage() . '</error>');
$io->verbose($e->getTraceAsString());

return self::CODE_ERROR;
} catch (Throwable $e) {
$io->err('<error>' . $e->getMessage() . '</error>');
$io->verbose($e->getTraceAsString());
Expand Down
7 changes: 4 additions & 3 deletions src/Command/SeedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Event\EventDispatcherTrait;
use Exception;
use Migrations\Config\ConfigInterface;
use Migrations\Migration\ManagerFactory;
use Migrations\Util\Util;
use Throwable;

/**
* Seed command runs seeder scripts
Expand Down Expand Up @@ -166,8 +166,9 @@ protected function executeSeeds(Arguments $args, ConsoleIo $io): ?int
// Get all available seeds and ask for confirmation
try {
$availableSeeds = $manager->getSeeds();
} catch (Exception $e) {
$io->error('Failed to load seeds: ' . $e->getMessage());
} catch (Throwable $e) {
$io->err('<error>Failed to load seeds: ' . $e->getMessage() . '</error>');
$io->verbose($e->getTraceAsString());

return static::CODE_ERROR;
}
Expand Down