Skip to content

Commit

Permalink
MAGETWO-80229: Vague error message for invalid url_key for category #…
Browse files Browse the repository at this point in the history
…11049

 - Merge Pull Request #11049 from avdb/magento2:issue-10697/adjust-error-message
 - Merged commits:
   1. c3ea1f5
   2. 0c0393d
   3. 8660485
  • Loading branch information
vrann committed Sep 28, 2017
2 parents fa2439c + 8660485 commit dc7ce8a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ protected function createCategory($name, $parentId)
$category->setIsActive(true);
$category->setIncludeInMenu(true);
$category->setAttributeSetId($category->getDefaultAttributeSetId());
$category->save();
$this->categoriesCache[$category->getId()] = $category;
try {
$category->save();
$this->categoriesCache[$category->getId()] = $category;
} catch (\Exception $e){
$this->addFailedCategory($category, $e);
}

return $category->getId();
}
Expand Down

0 comments on commit dc7ce8a

Please sign in to comment.