public function __construct(RoutableInterface $entity) { parent::__construct(sprintf('Route "%s" for entity of type "%s" and identifier "%s" has already been created.', $entity->getRoute()->getPath(), get_class($entity), $entity->getId())); $this->entity = $entity; }