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."