Skip to content

Commit df39677

Browse files
committed
GLDebug: Throw an IllegalArgumentException instead of an IllegalStateException
1 parent 4d81d00 commit df39677

File tree

1 file changed

+2
-5
lines changed
  • jme3-core/src/main/java/com/jme3/renderer/opengl

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
import java.lang.reflect.InvocationHandler;
3737
import java.lang.reflect.Method;
3838
import java.lang.reflect.Proxy;
39-
import java.util.logging.Level;
40-
import java.util.logging.Logger;
4139

4240
/**
4341
* 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 {
5452
protected Object obj;
5553
protected GL gl;
5654
protected Method methodGlGetError;
57-
private static final Logger LOG = Logger.getLogger(GLDebug.class.getName());
5855

5956
private GLDebug(GL gl, Object obj) throws NoSuchMethodException {
6057
this.gl = gl;
@@ -134,8 +131,8 @@ public static Object createProxy(GL gl, Object obj, Class<?>... implementedInter
134131
new GLDebug(gl, obj)
135132
);
136133
} catch (NoSuchMethodException nsme) {
137-
throw new IllegalStateException("Could not initialize the proxy because the glGetError method wasn't found!",
138-
nsme);
134+
throw new IllegalArgumentException ("Could not initialize the proxy because the glGetError method wasn't " +
135+
"found!", nsme);
139136
}
140137
}
141138
}

0 commit comments

Comments
 (0)