mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14124] Migrate cron:run exceptions
PHPBB3-14124
This commit is contained in:
parent
17e7a89a60
commit
2a07de70c2
1 changed files with 3 additions and 4 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
namespace phpbb\console\command\cron;
|
namespace phpbb\console\command\cron;
|
||||||
|
|
||||||
|
use phpbb\exception\runtime_exception;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
@ -92,8 +93,7 @@ class run extends \phpbb\console\command\command
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$output->writeln('<error>' . $this->user->lang('CRON_LOCK_ERROR') . '</error>');
|
throw new runtime_exception('CRON_LOCK_ERROR', array(), null, 1);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,8 +164,7 @@ class run extends \phpbb\console\command\command
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$output->writeln('<error>' . $this->user->lang('CRON_NO_SUCH_TASK', $task_name) . '</error>');
|
throw new runtime_exception('CRON_NO_SUCH_TASK', array( $task_name), null, 2);
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue