From d5bfe1e8131d4f37871aedaeb011165b42f699f1 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 bd0c59700..1afa6e3a7 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 @@ -657,7 +657,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<>();