gameServer/OfficialServer/DBInteraction.hs
changeset 2296 19f2f76dc346
parent 2245 c011aecc95e5
child 2306 1addfe9fddb1
--- a/gameServer/OfficialServer/DBInteraction.hs	Wed Aug 05 05:37:17 2009 +0000
+++ b/gameServer/OfficialServer/DBInteraction.hs	Wed Aug 05 05:44:13 2009 +0000
@@ -8,7 +8,11 @@
 import System.Process
 import System.IO
 import Control.Concurrent
-import Control.Exception
+#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
@@ -44,7 +48,7 @@
 
 
 pipeDbConnectionLoop queries coreChan hIn hOut accountsCache =
-	Control.Exception.handle (\e -> warningM "Database" (show e) >> return accountsCache) $
+	Exception.handle (\e -> warningM "Database" (show e) >> return accountsCache) $
 	do
 	q <- readChan queries
 	updatedCache <- case q of
@@ -83,7 +87,7 @@
 
 pipeDbConnection accountsCache serverInfo = do
 	updatedCache <-
-		Control.Exception.handle (\e -> warningM "Database" (show e) >> return accountsCache) $ do
+		Exception.handle (\e -> warningM "Database" (show e) >> return accountsCache) $ do
 			(Just hIn, Just hOut, _, _) <- createProcess (proc "./OfficialServer/extdbinterface" [])
 					{std_in = CreatePipe,
 					std_out = CreatePipe}