Hi Michael, 

i need to handle exception on GHandler monad level.

We have: 

type GHandler sub master = GGHandler sub master (Iteratee ByteString IO)

data GGHandler sub master m a
     ...
            MonadControlIO m => MonadControlIO (GGHandler sub master m)


(Iteratee ByteString IO) have no instance of  MonadControlIO thus we got error:

No instance for (MonadControlIO
                       (Data.Enumerator.Iteratee Data.ByteString.Internal.ByteString IO))
      arising from a use of `E.catch'
    Possible fix:
      add an instance declaration for
      (MonadControlIO
         (Data.Enumerator.Iteratee Data.ByteString.Internal.ByteString IO))


i need something like:

function :: Handler (Maybe Int)
function = do 
            res <- E.catch (runDB $ do 
                            action1
                            action2
                            ... 
                            return 1
                   )
                   (\(e :: E.SomeException) -> return 0)


How i can get this ?

Thanks.

--
Best regards,
Cheshkov Anton
Phone: +7 909 005 18 82
Skype: cheshkov_anton