From 4c2c3fa3754cc01849d0fe3acf8bfd55507da28a Mon Sep 17 00:00:00 2001 From: MeFisto94 Date: Sat, 4 Apr 2020 02:50:31 +0200 Subject: [PATCH] GLDebug: Throw an IllegalArgumentException instead of an IllegalStateException --- .../src/main/java/com/jme3/renderer/opengl/GLDebug.java | 7 ++----- 1 file changed, 2 insertions(+), 5 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 ba51d6642..a0fcfa3d2 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 @@ -36,8 +36,6 @@ import com.jme3.renderer.RendererException; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import java.util.logging.Level; -import java.util.logging.Logger; /** * This class uses Reflection to intercept method calls to the Proxy Object ({@link #createProxy(GL, Object, Class[])} @@ -54,7 +52,6 @@ public class GLDebug implements InvocationHandler { protected Object obj; protected GL gl; protected Method methodGlGetError; - private static final Logger LOG = Logger.getLogger(GLDebug.class.getName()); private GLDebug(GL gl, Object obj) throws NoSuchMethodException { this.gl = gl; @@ -134,8 +131,8 @@ public class GLDebug implements InvocationHandler { new GLDebug(gl, obj) ); } catch (NoSuchMethodException nsme) { - throw new IllegalStateException("Could not initialize the proxy because the glGetError method wasn't found!", - nsme); + throw new IllegalArgumentException ("Could not initialize the proxy because the glGetError method wasn't " + + "found!", nsme); } } }