Catch Throwable rather than Exception.

This commit is contained in:
NathanSweet 2018-11-20 16:45:03 +01:00
parent 369323b24a
commit 750722f1c9
2 changed files with 4 additions and 4 deletions

View File

@ -268,7 +268,7 @@ public class SkeletonJson {
try {
Attachment attachment = readAttachment(entry, skin, slot.index, entry.name, skeletonData);
if (attachment != null) skin.addAttachment(slot.index, entry.name, attachment);
} catch (Exception ex) {
} catch (Throwable ex) {
throw new SerializationException("Error reading attachment: " + entry.name + ", skin: " + skin, ex);
}
}
@ -307,7 +307,7 @@ public class SkeletonJson {
for (JsonValue animationMap = root.getChild("animations"); animationMap != null; animationMap = animationMap.next) {
try {
readAnimation(animationMap, animationMap.name, skeletonData);
} catch (Exception ex) {
} catch (Throwable ex) {
throw new SerializationException("Error reading animation: " + animationMap.name, ex);
}
}

View File

@ -200,7 +200,7 @@ public class SkeletonViewer extends ApplicationAdapter {
skeletonData = binary.readSkeletonData(skeletonFile);
if (skeletonData.getBones().size == 0) throw new Exception("No bones in skeleton data.");
}
} catch (Exception ex) {
} catch (Throwable ex) {
ex.printStackTrace();
ui.toast("Error loading skeleton: " + skeletonFile.name());
lastModifiedCheck = 5;
@ -1033,7 +1033,7 @@ public class SkeletonViewer extends ApplicationAdapter {
loadScaleSlider.setValue(prefs.getFloat("scale", 1));
animationList.setSelected(prefs.getString("animationName", null));
skinList.setSelected(prefs.getString("skinName", null));
} catch (Exception ex) {
} catch (Throwable ex) {
System.out.println("Unable to read preferences:");
ex.printStackTrace();
}