{% set _is_first_user_code = true %}
{% for i, trace in exception.trace %}
{% set _is_vendor_trace = trace.file is not empty and ('/vendor/' in trace.file or '/var/cache/' in trace.file) %}
{% set _display_code_snippet = _is_first_user_code and not _is_vendor_trace %}
{% if _display_code_snippet %}{% set _is_first_user_code = false %}{% endif %}
{{ include('@Twig/Exception/trace.html.twig', { prefix: index, i: i, trace: trace, style: _is_vendor_trace ? 'compact' : _display_code_snippet ? 'expanded' }, with_context = false) }}
{% endfor %}