mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Don't rethrow ALL exceptions when loading a Gauntlet, to ease debugging
This commit is contained in:
@@ -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(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user