Is there a more relevant exception you could throw here? Possibly \InvalidArgument or maybe there is an exception in Doctrine for DQL syntax?