9
9
use Magento \Catalog \Model \Product \Visibility ;
10
10
use Magento \CatalogImportExport \Model \Import \Product \RowValidatorInterface as ValidatorInterface ;
11
11
use Magento \Framework \App \Filesystem \DirectoryList ;
12
+ use Magento \Framework \Exception \LocalizedException ;
12
13
use Magento \Framework \Filesystem ;
13
14
use Magento \Framework \Model \ResourceModel \Db \ObjectRelationProcessor ;
14
15
use Magento \Framework \Model \ResourceModel \Db \TransactionManagerInterface ;
@@ -1084,12 +1085,12 @@ protected function _initTypeModels()
1084
1085
$ params = [$ this , $ productTypeName ];
1085
1086
if (!($ model = $ this ->_productTypeFactory ->create ($ productTypeConfig ['model ' ], ['params ' => $ params ]))
1086
1087
) {
1087
- throw new \ Magento \ Framework \ Exception \ LocalizedException (
1088
+ throw new LocalizedException (
1088
1089
__ ('Entity type model \'%1 \' is not found ' , $ productTypeConfig ['model ' ])
1089
1090
);
1090
1091
}
1091
1092
if (!$ model instanceof \Magento \CatalogImportExport \Model \Import \Product \Type \AbstractType) {
1092
- throw new \ Magento \ Framework \ Exception \ LocalizedException (
1093
+ throw new LocalizedException (
1093
1094
__ (
1094
1095
'Entity type model must be an instance of '
1095
1096
. \Magento \CatalogImportExport \Model \Import \Product \Type \AbstractType::class
@@ -1612,7 +1613,7 @@ protected function _saveProducts()
1612
1613
1613
1614
// wrong attribute_set_code was received
1614
1615
if (!$ attributeSetId ) {
1615
- throw new \ Magento \ Framework \ Exception \ LocalizedException (
1616
+ throw new LocalizedException (
1616
1617
__ (
1617
1618
'Wrong attribute set code "%1", please correct it and try again. ' ,
1618
1619
$ rowData ['attribute_set_code ' ]
@@ -1999,7 +2000,7 @@ protected function _getUploader()
1999
2000
}
2000
2001
2001
2002
if (!$ this ->_fileUploader ->setTmpDir ($ tmpPath )) {
2002
- throw new \ Magento \ Framework \ Exception \ LocalizedException (
2003
+ throw new LocalizedException (
2003
2004
__ ('File directory \'%1 \' is not readable. ' , $ tmpPath )
2004
2005
);
2005
2006
}
@@ -2008,7 +2009,7 @@ protected function _getUploader()
2008
2009
2009
2010
$ this ->_mediaDirectory ->create ($ destinationPath );
2010
2011
if (!$ this ->_fileUploader ->setDestDir ($ destinationPath )) {
2011
- throw new \ Magento \ Framework \ Exception \ LocalizedException (
2012
+ throw new LocalizedException (
2012
2013
__ ('File directory \'%1 \' is not writable. ' , $ destinationPath )
2013
2014
);
2014
2015
}
0 commit comments