Skip to content

Commit

Permalink
ENGCOM-6675: Extend exception message #26512
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka authored Feb 7, 2020
2 parents c53ca65 + 96ffbab commit dcca509
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/Model/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
public function execute($commandName)
{
if (!array_key_exists($commandName, $this->commands)) {
throw new NotFoundException(__('Command was not found.'));
throw new NotFoundException(__('Command "%1" was not found.', $commandName));
}

/** @var \Magento\Analytics\Model\Connector\CommandInterface $command */
Expand Down
6 changes: 5 additions & 1 deletion app/code/Magento/Analytics/Test/Unit/Model/ConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ public function testExecute()
}

/**
* Executing non-existing command
*
* @expectedException \Magento\Framework\Exception\NotFoundException
* @expectedExceptionMessage Command "register" was not found.
* @return void
*/
public function testExecuteCommandNotFound()
public function testExecuteCommandNotFound(): void
{
$commandName = 'register';
$this->connector->execute($commandName);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"There was an error save new configuration value.","There was an error save new configuration value."
"Please select an industry.","Please select an industry."
"--Please Select--","--Please Select--"
"Command was not found.","Command was not found."
"Command "%1" was not found.","Command "%1" was not found."
"Input data must be string or convertible into string.","Input data must be string or convertible into string."
"Input data must be non-empty string.","Input data must be non-empty string."
"Not valid cipher method.","Not valid cipher method."
Expand Down

0 comments on commit dcca509

Please sign in to comment.