{#
Autodoc Raises Partial

Renders the list of exceptions that can be raised.

Required: element (DocElement)
#}

{% let raises = element?.metadata?.raises ?? element?.raises ?? [] %}

{% if raises | length > 0 %}
<section class="autodoc-section" data-section="raises">
  <h2 class="autodoc-section-title">Raises</h2>
  <dl class="autodoc-raises">
    {% for exc in raises %}
    <div class="autodoc-raise">
      <dt><code>{{ exc?.type ?? exc }}</code></dt>
      <dd>{{ exc?.description | markdownify | safe if exc?.description else '' }}</dd>
    </div>
    {% end %}
  </dl>
</section>
{% end %}
