Handle error instances <p>Prints the message to stderr and aborts the program with the corresponding error code, or 0 if none.</p>
</span>
</li>
</ul>
<h2>Method Details</h2>
<divclass='methods'>
<divclass='method_details'>
<pclass='signature'id='handle-'>
~
(void)
<b>handle</b><span>(error, exit = true)</span>
<br>
</p>
<divclass='docstring'>
<p>Handle error instances</p><p>Prints the message to stderr and aborts the program with the corresponding error code, or 0 if none.</p><pre><code>error = new Error('My Error')
shouldExit = false
resin.errors.handle(error, shouldExit)
</code></pre>
</div>
<divclass='tags'>
<h3>Parameters:</h3>
<ulclass='param'>
<li>
<spanclass='name'>error</span>
<spanclass='type'>
(
<tt>Error</tt>
)
</span>
—
<spanclass='desc'>the error instance </span>
</li>
<li>
<spanclass='name'>exit</span>
<spanclass='type'>
(
<tt>Boolean</tt>
)
</span>
—
<spanclass='desc'>whether to exit or not (defaults to true) </span>