소스 검색

GLDebug: Throw an unchecked exception instead of returning null to enforce a crash when glGetError is not present.

MeFisto94 5 년 전
부모
커밋
00281b21a1
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebug.java

+ 1 - 2
jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebug.java

@@ -134,9 +134,8 @@ public class GLDebug implements InvocationHandler {
                     new GLDebug(gl, obj)
             );
         } catch (NoSuchMethodException nsme) {
-            LOG.log(Level.SEVERE, "Could not initialize the proxy because the glGetError method wasn't found!",
+            throw new IllegalStateException("Could not initialize the proxy because the glGetError method wasn't found!",
                     nsme);
-            return null;
         }
     }
 }