-requestReader cnf tree fbs h addr tQueue
- = cnf `seq` tree `seq` fbs `seq` h `seq` addr `seq` tQueue `seq`
- do catch (do input <- B.hGetContents h
- acceptRequest input) $ \ exc ->
- case exc of
- IOException _ -> return ()
- AsyncException ThreadKilled -> return ()
- BlockedIndefinitely -> putStrLn "requestReader: blocked indefinitely"
- _ -> print exc
+requestReader !cnf !tree !fbs !h !addr !tQueue
+ = do input <- B.hGetContents h
+ acceptRequest input
+ `catches`
+ [ Handler (( \ _ -> return () ) :: IOException -> IO ())
+ , Handler ( \ ThreadKilled -> return () )
+ , Handler ( \ BlockedIndefinitely -> hPutStrLn stderr "requestReader: blocked indefinitely" )
+ , Handler (( \ e -> hPutStrLn stderr (show e) ) :: SomeException -> IO ())
+ ]