Skip to content

Commit

Permalink
MAGETWO-57726: Exception is created but not thrown #6320
Browse files Browse the repository at this point in the history
  • Loading branch information
odubovyk committed Aug 29, 2016
1 parent bcdd65f commit 60add52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Reports/Block/Product/AbstractProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function getModel()
try {
$model = $this->_indexFactory->get($this->_indexType);
} catch (\InvalidArgumentException $e) {
new \Magento\Framework\Exception\LocalizedException(__('Index type is not valid'));
throw new \Magento\Framework\Exception\LocalizedException(__('Index type is not valid'));
}

return $model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function joinInventoryItem($fields = [])
public function filterByProductType($typeFilter)
{
if (!is_string($typeFilter) && !is_array($typeFilter)) {
new \Magento\Framework\Exception\LocalizedException(__('The product type filter specified is incorrect.'));
throw new \Magento\Framework\Exception\LocalizedException(__('The product type filter specified is incorrect.'));
}
$this->addAttributeToFilter('type_id', $typeFilter);
return $this;
Expand Down

0 comments on commit 60add52

Please sign in to comment.