throw exception when initializer don't retrieve a \Doctrine\ORM\EntityManager instance