mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
Catch Throwable rather than Exception.
This commit is contained in:
parent
369323b24a
commit
750722f1c9
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user