From e50de694208c64cec81f12144dbda5bfce0dadde Mon Sep 17 00:00:00 2001 From: magenoxx Date: Thu, 26 Jan 2012 01:59:53 +0400 Subject: [PATCH] compilation error fix. --- Mage.Common/src/mage/remote/Session.java | 6 +++++- Mage.Server/src/main/java/mage/server/MageServerImpl.java | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage.Common/src/mage/remote/Session.java b/Mage.Common/src/mage/remote/Session.java index 2ef6bd1bbe..82c8edaf1d 100644 --- a/Mage.Common/src/mage/remote/Session.java +++ b/Mage.Common/src/mage/remote/Session.java @@ -202,7 +202,11 @@ public class Session { private void runEmbeddedMageServer() { if (embeddedMageServerAction != null) { - embeddedMageServerAction.execute(); + try { + embeddedMageServerAction.execute(); + } catch (MageException e) { + logger.error(e); + } } } diff --git a/Mage.Server/src/main/java/mage/server/MageServerImpl.java b/Mage.Server/src/main/java/mage/server/MageServerImpl.java index c984544d21..f08665dd8a 100644 --- a/Mage.Server/src/main/java/mage/server/MageServerImpl.java +++ b/Mage.Server/src/main/java/mage/server/MageServerImpl.java @@ -746,6 +746,8 @@ public class MageServerImpl implements MageServer { } catch (MageException me) { throw new RuntimeException(me); } + } else { + LogServiceImpl.instance.log(LogKeys.KEY_NOT_VALID_SESSION_INTERNAL, actionName, sessionId); } } } @@ -769,6 +771,7 @@ public class MageServerImpl implements MageServer { return executeWithResult(actionName, sessionId, action); } + //TODO: also run in threads with future task protected T executeWithResult(String actionName, final String sessionId, final ActionWithResult action) throws MageException { if (SessionManager.getInstance().isValidSession(sessionId)) { try {