
7 Nov
2012
7 Nov
'12
4:08 p.m.
On 12-11-07 03:36 PM, timothyhobbs@seznam.cz wrote:
I am trying to catch an "thread blocked on MVar indefinitely exception." Of course I can use ::SomeException as explained in http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exc... but there is no explanation as to how to find the more case specific exceptions.
In general, because Exception instances are Typeable instances, you can get a name, and then you can use that for searches. import Control.Exception import Data.Typeable main = do aida <- try (readFile "no") case aida of Left (SomeException e) -> print (typeOf e)