Kernel.php 731 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php namespace App\Console;
  2. use Exception;
  3. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  4. class Kernel extends ConsoleKernel {
  5. /**
  6. * The Artisan commands provided by your application.
  7. *
  8. * @var array
  9. */
  10. protected $commands = [
  11. 'App\Console\Commands\InspireCommand',
  12. ];
  13. /**
  14. * Run the console application.
  15. *
  16. * @param \Symfony\Component\Console\Input\InputInterface $input
  17. * @param \Symfony\Component\Console\Output\OutputInterface $output
  18. * @return int
  19. */
  20. public function handle($input, $output = null)
  21. {
  22. try
  23. {
  24. return parent::handle($input, $output);
  25. }
  26. catch (Exception $e)
  27. {
  28. $this->reportException($e);
  29. $this->renderException($output, $e);
  30. return 1;
  31. }
  32. }
  33. }