Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private function doAsk($inputStream, OutputInterface $output, Question $question
}

if (false === $ret) {
throw new MissingInputException('Aborted.');
throw new MissingInputException('Aborted. Unable to read input of question: '.$question->getQuestion());
}
if ($question->isTrimmable()) {
$ret = trim($ret);
Expand Down Expand Up @@ -271,7 +271,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
// as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false.
if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) {
shell_exec('stty '.$sttyMode);
throw new MissingInputException('Aborted while asking: '.$question->getQuestion());
throw new MissingInputException('Aborted. Trying to autocomplete: '.$question->getQuestion());
} elseif ("\177" === $c) { // Backspace Character
if (0 === $numMatches && 0 !== $i) {
--$i;
Expand Down Expand Up @@ -443,7 +443,7 @@ private function getHiddenResponse(OutputInterface $output, $inputStream, bool $
}

if (false === $value) {
throw new MissingInputException('Aborted.');
throw new MissingInputException('Aborted. Unable to read hidden input.');
}
if ($trimmable) {
$value = trim($value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ public function testAskThrowsExceptionOnMissingInput()
public function testAskThrowsExceptionOnMissingInputForChoiceQuestion()
{
$this->expectException(MissingInputException::class);
$this->expectExceptionMessage('Aborted while asking: Choice');
$this->expectExceptionMessage('Aborted. Trying to autocomplete: Choice');
(new QuestionHelper())->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new ChoiceQuestion('Choice', ['a', 'b']));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function testCommandWithQuestionsButNoInputs()
$tester = new CommandTester($command);

$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('Aborted.');
$this->expectExceptionMessage('Aborted. Unable to read input of question: choice');

$tester->execute([]);
}
Expand Down
Loading