Skip to content

Commit

Permalink
Add category to url_key error message
Browse files Browse the repository at this point in the history
Error message for url_key is not wrong but too short
Use addFailedCategory() to add category to error message

Issue: 10697
  • Loading branch information
An Van den Bosch committed Sep 26, 2017
1 parent 0c0393d commit 8660485
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 8660485

Please sign in to comment.