[Haskell-cafe] Absolutely confused with error/exception handling

Brandon Allbery allbery.b at gmail.com
Fri Dec 16 21:43:10 UTC 2016


On Fri, Dec 16, 2016 at 7:30 AM, Saurabh Nanda <saurabhnanda at gmail.com>
wrote:

>
> How do I catch an exception coming out of an action in the ActionCtxT
> monad?
>

I think I'm going to have to let someone else answer. I just got lost in
MonadBaseControl, not to mention how you do this if all you have is the
ActionCtxT and not the WebStateT where Spock actually handles exceptions. :/

If it helps, exception handling is known to be a sewer --- because it can't
be done in a clean and generic way without introducing significant resource
leaks and other problems. And MonadBaseControl works when you (or the
developer, in this case of Spock) define the right instances, but is doing
it the hard way.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161216/ae29081e/attachment.html>


More information about the Haskell-Cafe mailing list