Kernel.php 538 B

1234567891011121314151617181920212223242526272829
  1. <?php namespace App\Console;
  2. use Exception;
  3. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  4. class Kernel extends ConsoleKernel {
  5. /**
  6. * Run the console application.
  7. *
  8. * @param \Symfony\Component\Console\Input\InputInterface $input
  9. * @param \Symfony\Component\Console\Output\OutputInterface $output
  10. * @return int
  11. */
  12. public function handle($input, $output = null)
  13. {
  14. try
  15. {
  16. return parent::handle($input, $output);
  17. }
  18. catch (Exception $e)
  19. {
  20. $output->writeln((string) $e);
  21. return 1;
  22. }
  23. }
  24. }