From f57691c62b0028dfe13133375a2f4d5b4cb85625 Mon Sep 17 00:00:00 2001 From: Maksym Novik Date: Thu, 23 May 2019 13:03:43 +0300 Subject: [PATCH] Msi 2182 source entity expansion with pickup location attributes. LocalizedException -> InvalidArgumentException --- .../InventoryInStorePickupApi/Model/Mapper.php | 11 +++++------ .../Magento/InventoryInStorePickupApi/i18n/en_US.csv | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 app/code/Magento/InventoryInStorePickupApi/i18n/en_US.csv diff --git a/app/code/Magento/InventoryInStorePickupApi/Model/Mapper.php b/app/code/Magento/InventoryInStorePickupApi/Model/Mapper.php index 1729b203164f..a3887a19fcaa 100644 --- a/app/code/Magento/InventoryInStorePickupApi/Model/Mapper.php +++ b/app/code/Magento/InventoryInStorePickupApi/Model/Mapper.php @@ -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; @@ -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, @@ -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 ) ); diff --git a/app/code/Magento/InventoryInStorePickupApi/i18n/en_US.csv b/app/code/Magento/InventoryInStorePickupApi/i18n/en_US.csv deleted file mode 100644 index be3e1c2ee00d..000000000000 --- a/app/code/Magento/InventoryInStorePickupApi/i18n/en_US.csv +++ /dev/null @@ -1 +0,0 @@ -"Source Data Pre Processor must implement %1.","Source Data Pre Processor must implement %1."