8000 [Console] Fix catching exception type in QuestionHelper · symfony/symfony@1c091eb · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c091eb

Browse files
committed
[Console] Fix catching exception type in QuestionHelper
1 parent 04cbc10 commit 1c091eb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ public function getName()
111111
*
112112
* @return bool|mixed|null|string
113113
*
114-
* @throws \Exception
115-
* @throws \RuntimeException
114+
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
116115
*/
117116
public function doAsk(OutputInterface $output, Question $question)
118117
{
@@ -126,7 +125,7 @@ public function doAsk(OutputInterface $output, Question $question)
126125
if ($question->isHidden()) {
127126
try {
128127
$ret = trim($this->getHiddenResponse($output, $inputStream));
129-
} catch (\RuntimeException $e) {
128+
} catch (RuntimeException $e) {
130129
if (!$question->isHiddenFallback()) {
131130
throw $e;
132131
}

0 commit comments

Comments
 (0)
0