mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Catch Throwable rather than Exception.
This commit is contained in:
parent
369323b24a
commit
750722f1c9
@ -268,7 +268,7 @@ public class SkeletonJson {
|
|||||||
try {
|
try {
|
||||||
Attachment attachment = readAttachment(entry, skin, slot.index, entry.name, skeletonData);
|
Attachment attachment = readAttachment(entry, skin, slot.index, entry.name, skeletonData);
|
||||||
if (attachment != null) skin.addAttachment(slot.index, entry.name, attachment);
|
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);
|
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) {
|
for (JsonValue animationMap = root.getChild("animations"); animationMap != null; animationMap = animationMap.next) {
|
||||||
try {
|
try {
|
||||||
readAnimation(animationMap, animationMap.name, skeletonData);
|
readAnimation(animationMap, animationMap.name, skeletonData);
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
throw new SerializationException("Error reading animation: " + animationMap.name, ex);
|
throw new SerializationException("Error reading animation: " + animationMap.name, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -200,7 +200,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
|||||||
skeletonData = binary.readSkeletonData(skeletonFile);
|
skeletonData = binary.readSkeletonData(skeletonFile);
|
||||||
if (skeletonData.getBones().size == 0) throw new Exception("No bones in skeleton data.");
|
if (skeletonData.getBones().size == 0) throw new Exception("No bones in skeleton data.");
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
ui.toast("Error loading skeleton: " + skeletonFile.name());
|
ui.toast("Error loading skeleton: " + skeletonFile.name());
|
||||||
lastModifiedCheck = 5;
|
lastModifiedCheck = 5;
|
||||||
@ -1033,7 +1033,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
|||||||
loadScaleSlider.setValue(prefs.getFloat("scale", 1));
|
loadScaleSlider.setValue(prefs.getFloat("scale", 1));
|
||||||
animationList.setSelected(prefs.getString("animationName", null));
|
animationList.setSelected(prefs.getString("animationName", null));
|
||||||
skinList.setSelected(prefs.getString("skinName", null));
|
skinList.setSelected(prefs.getString("skinName", null));
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
System.out.println("Unable to read preferences:");
|
System.out.println("Unable to read preferences:");
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user