{% if exercices is iterable and exercices|length > 0 %}
{% for exercice in exercices %}
{% endfor %}
{% else %}

Erreur : {{ exercices|raw }}

{% endif %}