use of games.strategy.engine.data.EngineVersionException in project triplea by triplea-game.
the class GameChooserEntry method fullyParseGameData.
public GameData fullyParseGameData() throws GameParseException {
// TODO: We should be setting this in the the constructor. At this point, you have to call methods in the
// correct order for things to work, and that is bads.
gameData = null;
final Optional<InputStream> inputStream = UrlStreams.openStream(url);
if (!inputStream.isPresent()) {
return gameData;
}
try (InputStream input = inputStream.get()) {
gameData = GameParser.parse(url.toString(), input);
gameDataFullyLoaded = true;
} catch (final EngineVersionException e) {
ClientLogger.logQuietly("Game engine not compatible with: " + url, e);
throw new GameParseException(e);
} catch (final GameParseException e) {
ClientLogger.logError("Could not parse:" + url, e);
throw e;
} catch (final Exception e) {
ClientLogger.logError("Could not parse:" + url, e);
throw new GameParseException(e);
}
return gameData;
}
Aggregations