aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/cron
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-10-07 14:47:23 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-07 14:47:23 +0200
commitda4d6dfa28bff4a869277fe1ca102ce46ead7ef4 (patch)
treef8c34183520c6f37745bef367c7b42277406f068 /phpBB/phpbb/console/command/cron
parentd7109fb130511c213859ede614a11e9fbccf0c75 (diff)
parentd13d66fc01688e0e9f49bae5cf368dc16220aa40 (diff)
downloadforums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar.gz
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar.bz2
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar.xz
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.zip
Merge pull request #3857 from Nicofuma/ticket/14124
[ticket/14124] Automatically translate exceptions in CLI
Diffstat (limited to 'phpBB/phpbb/console/command/cron')
-rw-r--r--phpBB/phpbb/console/command/cron/run.php7
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);
}
}
}