Added a better handling of twig exception in twig ext