Skip to content

Commit defde8f

Browse files
committed
MAGETWO-34991: Eliminate exceptions from the list Part2
1 parent 16b2b37 commit defde8f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

app/code/Magento/Rss/Controller/Adminhtml/Feed/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function execute()
3030
try {
3131
$provider = $this->rssManager->getProvider($type);
3232
} catch (\InvalidArgumentException $e) {
33-
throw new NotFoundException($e->getMessage());
33+
throw new NotFoundException(__($e->getMessage()));
3434
}
3535

3636
if (!$provider->isAllowed()) {

app/code/Magento/Rss/Controller/Feed/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function execute()
3030
try {
3131
$provider = $this->rssManager->getProvider($type);
3232
} catch (\InvalidArgumentException $e) {
33-
throw new NotFoundException($e->getMessage());
33+
throw new NotFoundException(__($e->getMessage()));
3434
}
3535

3636
if ($provider->isAuthRequired() && !$this->auth()) {

dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function cleanupReports()
6060
} catch (\Magento\Framework\Exception\FileSystemException $e) {
6161
if (file_exists($reportDir)) {
6262
throw new \Magento\Framework\Exception\LocalizedException(
63-
__("Cannot cleanup reports directory '%1'.", $reportDir)
63+
new \Magento\Framework\Phrase("Cannot cleanup reports directory '%1'.", $reportDir)
6464
);
6565
}
6666
}

dev/tools/Magento/Tools/Di/Code/Reader/ClassesScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getList($path)
4545
{
4646
$realPath = realpath($path);
4747
if (!(bool)$realPath) {
48-
throw new FileSystemException(new \Magento\Framework\Phrase('Invalid path: %1', $realPath));
48+
throw new FileSystemException(new \Magento\Framework\Phrase('Invalid path: %1', $path));
4949
}
5050

5151
$recursiveIterator = new \RecursiveIteratorIterator(

lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function testDispatchedNotFoundException()
120120
$this->router->expects($this->at(0))
121121
->method('match')
122122
->with($this->request)
123-
->will($this->throwException(new NotFoundException(__('Page not found.'))));
123+
->willThrowException(new NotFoundException(new \Magento\Framework\Phrase('Page not found.')));
124124
$this->router->expects($this->at(1))
125125
->method('match')
126126
->with($this->request)

0 commit comments

Comments
 (0)