Skip to content

Commit

Permalink
Msi 2182 source entity expansion with pickup location attributes.
Browse files Browse the repository at this point in the history
LocalizedException -> InvalidArgumentException
  • Loading branch information
Maksym Novik committed May 23, 2019
1 parent 28c8dda commit f57691c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions app/code/Magento/InventoryInStorePickupApi/Model/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Magento\InventoryInStorePickupApi\Model;

use Magento\Framework\Exception\LocalizedException;
use InvalidArgumentException;
use Magento\InventoryApi\Api\Data\SourceInterface;
use Magento\InventoryInStorePickupApi\Api\Data\PickupLocationInterface;
use Magento\InventoryInStorePickupApi\Model\Mapper\CreateFromSourceInterface;
Expand Down Expand Up @@ -42,8 +42,7 @@ class Mapper
* @param CreateFromSourceInterface $createFromSource
* @param string[] $map
* @param PreProcessorInterface[] $preProcessors
*
* @throws \Magento\Framework\Exception\LocalizedException
* @throws InvalidArgumentException
*/
public function __construct(
CreateFromSourceInterface $createFromSource,
Expand All @@ -55,9 +54,9 @@ public function __construct(

foreach ($preProcessors as $preProcessor) {
if (!$preProcessor instanceof PreProcessorInterface) {
throw new LocalizedException(
__(
'Source Data PreProcessor must implement %1.',
throw new InvalidArgumentException(
sprintf(
'Source Data PreProcessor must implement %s.',
PreProcessorInterface::class
)
);
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/InventoryInStorePickupApi/i18n/en_US.csv

This file was deleted.

0 comments on commit f57691c

Please sign in to comment.