<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 8:42 PM, Saurabh Nanda <span dir="ltr"><<a href="mailto:saurabhnanda@gmail.com" target="_blank">saurabhnanda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">* What exactly is done by the "error" function? How does one "trap" those errors and react to it? Can "catch" trap those errors? What is "e" in the case of errors raised by "error"?</div><div dir="auto"></div></blockquote><div><br></div><div>`error` specifically raises a UserError exception, with a user-specified payload (message). `catch` can catch them as such.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">* How is "error" different from "throw" and "throwIO" (in the Control.Exception package, I believe)</div><div dir="auto"></div></blockquote></div><br>`throw` (for pure code / asynchronous) and `throwIO` (for code in IO) can throw any exception. No guarantees are made as to when the exception thrown by `throw`<br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>