소스 검색

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.

Paul Speed 6 년 전
부모
커밋
6f6041f6ae
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java

+ 1 - 1
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<TechniqueDef> techniqueDefs = new ArrayList<>();