diff --git a/Command/ExecuteCommand.php b/Command/ExecuteCommand.php index 854fcd7a..12dc32c1 100644 --- a/Command/ExecuteCommand.php +++ b/Command/ExecuteCommand.php @@ -183,7 +183,7 @@ private function executeCommand(ScheduledCommand $scheduledCommand, OutputInterf $this->em->persist($scheduledCommand); $this->em->flush(); $this->em->getConnection()->commit(); - } catch (\Exception $e) { + } catch (\Throwable $e) { $this->em->getConnection()->rollBack(); $output->writeln( sprintf( @@ -238,7 +238,7 @@ private function executeCommand(ScheduledCommand $scheduledCommand, OutputInterf .' '.$scheduledCommand->getArguments().'' ); $result = $command->run($input, $logOutput); - } catch (\Exception $e) { + } catch (\Throwable $e) { $logOutput->writeln($e->getMessage()); $logOutput->writeln($e->getTraceAsString()); $result = -1;