You should use the `Symfony\Cmf\Bundle\SeoBundle\Exception\InvalidArgumentException`. And I prefer a more describing message, like `sprintf('Expected either an array or KeyValueContainer, got "%s"', is_object($data) ? getclass($data) : get_type($data));`