html">on_error()</a></code> behaves as <code>on.exit()</code> except it happens only when there is an error in the function.</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb32-1" title="1">y &lt;-<span class="st"> </span><span class="cf">function</span>(x){</a>
<a class="sourceLine" id="cb32-2" title="2">  <span class="kw"><a href="reference/on_error.html">on_error</a></span>(<span class="op">~</span><span class="st"> </span><span class=