Skip to content

Commit

Permalink
[BUGFIX] Catch InvalidArgumentException in scheduler
Browse files Browse the repository at this point in the history
When an argument definition of a console command changes for a
scheduled task, it rendered the whole backend module unusable.
We already had exception handling for options and missing arguments
in place, now the InvalidArgumentException handling has been added as
well.

Resolves: #89057
Releases: master, 9.5
Change-Id: I8e182ed555a10672b0fd1c5c7249a3e8cfc5e6ad
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63578
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
susannemoog authored and bmack committed Mar 7, 2020
1 parent 07dded9 commit 4d84dbe
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -124,7 +124,7 @@ public function getAdditionalInformation(): string
try {
$input = new ArrayInput($this->getParameters(true), $schedulableCommand->getDefinition());
$arguments = $input->__toString();
} catch (\Symfony\Component\Console\Exception\RuntimeException $e) {
} catch (\Symfony\Component\Console\Exception\RuntimeException|\Symfony\Component\Console\Exception\InvalidArgumentException $e) {
return $label . "\n"
. sprintf(
$this->getLanguageService()->sL('LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:msg.errorParsingArguments'),
Expand Down

0 comments on commit 4d84dbe

Please sign in to comment.