SLayoutIO Will catch more general exceptions - not just the ones related to malformed xml.

FControl.mayShowCard - will show card anyway wihout further checks if game has no human player
This commit is contained in:
Maxmtg
2013-06-04 06:15:38 +00:00
parent 154c8e8604
commit a6ed6d7600
2 changed files with 2 additions and 2 deletions

View File

@@ -329,7 +329,7 @@ public enum FControl {
public boolean mayShowCard(Card c) {
if ( game == null ) return true;
return c.canBeShownTo(getCurrentPlayer());
return !gameHasHumanPlayer || c.canBeShownTo(getCurrentPlayer());
}
/**

View File

@@ -173,7 +173,7 @@ public final class SLayoutIO {
try {
xer = inputFactory.createXMLEventReader(fis);
model = readLayout(xer);
} catch (final XMLStreamException e) {
} catch (final Exception e) { // I don't care what happened inside, the layout is wrong
try {
if ( xer != null ) xer.close();
} catch (final XMLStreamException x) {