From 2a07de70c2decb9669990286391cef1d427244bc Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 25 Aug 2015 22:24:37 +0200 Subject: [ticket/14124] Migrate cron:run exceptions PHPBB3-14124 --- phpBB/phpbb/console/command/cron/run.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'phpBB/phpbb/console/command/cron/run.php') diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php index 72ad1205ef..da185b81b3 100644 --- a/phpBB/phpbb/console/command/cron/run.php +++ b/phpBB/phpbb/console/command/cron/run.php @@ -13,6 +13,7 @@ namespace phpbb\console\command\cron; +use phpbb\exception\runtime_exception; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Output\OutputInterface; @@ -92,8 +93,7 @@ class run extends \phpbb\console\command\command } else { - $output->writeln('' . $this->user->lang('CRON_LOCK_ERROR') . ''); - return 1; + throw new runtime_exception('CRON_LOCK_ERROR', array(), null, 1); } } @@ -164,8 +164,7 @@ class run extends \phpbb\console\command\command } else { - $output->writeln('' . $this->user->lang('CRON_NO_SUCH_TASK', $task_name) . ''); - return 2; + throw new runtime_exception('CRON_NO_SUCH_TASK', array( $task_name), null, 2); } } } -- cgit v1.2.1