mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Minor changes to logging.
This commit is contained in:
parent
4a2be2c3e6
commit
1241f6582b
2 changed files with 4 additions and 1 deletions
|
@ -288,10 +288,13 @@ public class GameSession extends GameWatcher {
|
|||
player.quit(game);
|
||||
} catch (Exception ex) {
|
||||
if (ex != null) {
|
||||
// It seems this can happen if two threads try to end the game at the exact same time (one wins and one ends here)
|
||||
logger.fatal("Game session game quit exception " + (ex.getMessage() == null ? "null":ex.getMessage()));
|
||||
logger.debug("- gameId:" + game.getId() +" playerId: " + playerId);
|
||||
if (ex.getCause() != null) {
|
||||
logger.debug("- Cause: " + (ex.getCause().getMessage() == null ? "null":ex.getCause().getMessage()));
|
||||
} else {
|
||||
logger.debug("- ex: " + ex.toString());
|
||||
}
|
||||
ex.printStackTrace();
|
||||
}else {
|
||||
|
|
|
@ -1749,7 +1749,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
}
|
||||
if (opponentsAlive == 0 && !hasWon()) {
|
||||
logger.debug("player won -> No more oppononets alive game won: " + this.getName());
|
||||
logger.debug("player won -> No more opponents alive game won: " + this.getName());
|
||||
game.informPlayers(new StringBuilder(this.getName()).append(" has won the game").toString());
|
||||
this.wins = true;
|
||||
game.end();
|
||||
|
|
Loading…
Reference in a new issue