From 6f6041f6ae6994739b66d964bb921d242c74c1db Mon Sep 17 00:00:00 2001 From: Paul Speed Date: Tue, 20 Nov 2018 03:31:00 -0500 Subject: [PATCH] Modified the J3M loader to be a little less like a 1980s text adventure. Added a message to the exception thrown when using an invalid light mode. Converted it to an IOException instead of the UnsupportedOperationException (which is a runtime exception) so that the calling code will output a meaningful error about which asset actually failed. --- .../src/plugins/java/com/jme3/material/plugins/J3MLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java index c3ac904a5..89dc9c2cc 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java @@ -652,7 +652,7 @@ public class J3MLoader implements AssetLoader { technique.setLogic(new SinglePassAndImageBasedLightingLogic(technique)); break; default: - throw new UnsupportedOperationException(); + throw new IOException("Light mode not supported:" + technique.getLightMode()); } List techniqueDefs = new ArrayList<>();