GUI: added changeable card popup mode for chats/logs by card name clicks (alternative to mouse wheel from game cards);

other: fixed duplicated chat popups in game, added miss error logs from popup related code, added additional checks for good code usage;
This commit is contained in:
Oleg Agafonov 2023-11-26 12:48:41 +04:00
parent 785f6973b9
commit 4500b79008
12 changed files with 129 additions and 70 deletions

View file

@ -2,6 +2,7 @@ package mage.server.util;
import mage.server.managers.ConfigSettings;
import mage.server.managers.ThreadExecutor;
import mage.utils.ThreadUtils;
import org.apache.log4j.Logger;
import java.util.concurrent.*;
@ -63,6 +64,7 @@ public class ThreadExecutorImpl implements ThreadExecutor {
super.afterExecute(r, t);
// catch errors in CALL threads (from client commands)
t = ThreadUtils.findRealException(r, t);
if (t != null) {
logger.error("Catch unhandled error in CALL thread: " + t.getMessage(), t);
}
@ -81,6 +83,7 @@ public class ThreadExecutorImpl implements ThreadExecutor {
super.afterExecute(r, t);
// catch errors in GAME threads (from game processing)
t = ThreadUtils.findRealException(r, t);
if (t != null) {
// it's impossible to brake game thread in normal use case, so each bad use case must be researched
logger.error("Catch unhandled error in GAME thread: " + t.getMessage(), t);