Added exception handling to twig linter