{% for i, e in exception.toarray %} [{{ i + 1 }}] {{ e.class }}: {{ e.message }} {% include 'TwigBundle:Exception:traces.txt.twig' with { 'exception': e } only %} {% endfor %}