Don't rethrow ALL exceptions when loading a Gauntlet, to ease debugging

This commit is contained in:
elcnesh
2015-04-04 14:26:28 +00:00
parent 259291367f
commit edeeec11d1

View File

@@ -81,16 +81,15 @@ public class GauntletIO {
GZIPInputStream zin = null; GZIPInputStream zin = null;
try { try {
zin = new GZIPInputStream(new FileInputStream(xmlSaveFile)); zin = new GZIPInputStream(new FileInputStream(xmlSaveFile));
InputStreamReader reader = new InputStreamReader(zin); final InputStreamReader reader = new InputStreamReader(zin);
GauntletData data = (GauntletData)GauntletIO.getSerializer(true).fromXML(reader); final GauntletData data = (GauntletData)GauntletIO.getSerializer(true).fromXML(reader);
String filename = xmlSaveFile.getName(); final String filename = xmlSaveFile.getName();
data.setName(filename.substring(0, filename.length() - SUFFIX_DATA.length())); data.setName(filename.substring(0, filename.length() - SUFFIX_DATA.length()));
return data; return data;
} catch (final Exception ex) { } catch (final IOException e) {
throw new RuntimeException(ex); throw new RuntimeException(e);
} finally { } finally {
if (null != zin) { if (null != zin) {
try { zin.close(); } try { zin.close(); }