diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-08-25 22:24:37 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-08-25 22:24:37 +0200 |
commit | 2a07de70c2decb9669990286391cef1d427244bc (patch) | |
tree | 6c376c08910631665a5ca9c4030898f5f943e213 /phpBB/phpbb/console | |
parent | 17e7a89a60f700efc8a0b082b7a82005e6288e80 (diff) | |
download | forums-2a07de70c2decb9669990286391cef1d427244bc.tar forums-2a07de70c2decb9669990286391cef1d427244bc.tar.gz forums-2a07de70c2decb9669990286391cef1d427244bc.tar.bz2 forums-2a07de70c2decb9669990286391cef1d427244bc.tar.xz forums-2a07de70c2decb9669990286391cef1d427244bc.zip |
[ticket/14124] Migrate cron:run exceptions
PHPBB3-14124
Diffstat (limited to 'phpBB/phpbb/console')
-rw-r--r-- | phpBB/phpbb/console/command/cron/run.php | 7 |
1 files changed, 3 insertions, 4 deletions
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('<error>' . $this->user->lang('CRON_LOCK_ERROR') . '</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('<error>' . $this->user->lang('CRON_NO_SUCH_TASK', $task_name) . '</error>'); - return 2; + throw new runtime_exception('CRON_NO_SUCH_TASK', array( $task_name), null, 2); } } } |