From 4d81d00f4532b8437934b0629feecb22d8e19d21 Mon Sep 17 00:00:00 2001 From: MeFisto94 Date: Wed, 1 Apr 2020 19:45:37 +0200 Subject: [PATCH] GLDebug: Throw an unchecked exception instead of returning null to enforce a crash when glGetError is not present. --- jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebug.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebug.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebug.java index a7c95ea2e..ba51d6642 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebug.java +++ b/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; } } }