ss="mdzsyn-symbol">f</span>)) <span class="mdzsyn-comment"># -&gt; throws an error because the fiber is dead</span></code></pre><h2 id="Using-fibers-to-capture-errors">Using fibers to capture errors
</h2>
<p>Besides being used as coroutines, fibers can be used to implement error handling
(i.e. exceptions).
</p>
<pre class="mendoza-codeblock"><code data-language="janet">(<span class="mdzsyn-coresym">defn</span> <span class="mdzsyn-symbol">my-function-that-errors</span> []
 (<span class="mdzsyn-coresym">print