# HG changeset patch # User unc0rr # Date 1253169397 0 # Node ID 56b2e12b9eeb57e18ac67fe6ab84e7dfaf45db11 # Parent 9098f0430b6b3e26a840270e5be5bc0f6ca4fee7 Fix build diff -r 9098f0430b6b -r 56b2e12b9eeb gameServer/OfficialServer/DBInteraction.hs --- a/gameServer/OfficialServer/DBInteraction.hs Wed Sep 16 14:45:00 2009 +0000 +++ b/gameServer/OfficialServer/DBInteraction.hs Thu Sep 17 06:36:37 2009 +0000 @@ -8,11 +8,7 @@ import System.Process import System.IO import Control.Concurrent -#if defined(NEW_EXCEPTIONS) -import qualified Control.OldException as Exception -#else import qualified Control.Exception as Exception -#endif import Control.Monad import qualified Data.Map as Map import Monad @@ -38,18 +34,8 @@ #if defined(OFFICIAL_SERVER) -------------------------------------------------------------------- --- borrowed from base 4.0.0 --------------------------------------- -onException :: IO a -> IO b -> IO a -onException io what = io `Exception.catch` \e -> do - what - Exception.throw (e :: Exception.Exception) --- to be deleted -------------------------------------------------- -------------------------------------------------------------------- - - pipeDbConnectionLoop queries coreChan hIn hOut accountsCache = - Exception.handle (\e -> warningM "Database" (show e) >> return accountsCache) $ + Exception.handle (\(e :: Exception.IOException) -> warningM "Database" (show e) >> return accountsCache) $ do q <- readChan queries updatedCache <- case q of