diff options
Diffstat (limited to 'phpBB/phpbb/console/command/cron/run.php')
-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 a9648fcd41..dea6493007 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; @@ -93,8 +94,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); } } @@ -165,8 +165,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); } } } |