gameServer/OfficialServer/GameReplayStore.hs
changeset 8502 fb8d914e76d8
parent 8495 f1223400b473
child 8509 eda9f2106d8d
equal deleted inserted replaced
8501:9f70e6f7fb63 8502:fb8d914e76d8
    39         return []
    39         return []
    40     where
    40     where
    41         loadFile :: String -> IO [B.ByteString]
    41         loadFile :: String -> IO [B.ByteString]
    42         loadFile fileName = E.handle (\(e :: SomeException) -> warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return []) $ do
    42         loadFile fileName = E.handle (\(e :: SomeException) -> warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return []) $ do
    43             (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName
    43             (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName
    44             return $ replayToDemo teams (Map.fromList params1) (Map.fromList params2) roundMsgs
    44             return $ replayToDemo teams (Map.fromList params1) (Map.fromList params2) (reverse roundMsgs)