Skip to content

Commit

Permalink
Add more verbose error message for PromotionActionsPass
Browse files Browse the repository at this point in the history
  • Loading branch information
tchapi committed Mar 24, 2017
1 parent a08aff2 commit 21c7925
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -35,7 +35,7 @@ public function process(ContainerBuilder $container)
$promotionActionTypeToLabelMap = [];
foreach ($container->findTaggedServiceIds('sylius.promotion_action') as $id => $attributes) {
if (!isset($attributes[0]['type'], $attributes[0]['label'], $attributes[0]['form-type'])) {
throw new \InvalidArgumentException('Tagged promotion action needs to have `type`, `form-type` and `label` attributes.');
throw new \InvalidArgumentException('Tagged promotion action `'.$id.'` needs to have `type`, `form-type` and `label` attributes.');
}

$promotionActionTypeToLabelMap[$attributes[0]['type']] = $attributes[0]['label'];
Expand Down

0 comments on commit 21c7925

Please sign in to comment.