@Baachi Twig already uses InvalidArgumentException when an extension is doing invalid stuff.