@Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object result = method.invoke(obj, args);

        if (method.equals(methodGlGetError)) {
            return result;
        }

        checkError();
        return result;
    }
This class uses Reflection to intercept method calls to the Proxy Object ({@link #createProxy(GL, Object, Class[])}
and extends them with the Error Checking in {@link #checkError()}.<br>
This means we don't have to generate a class with overrides for every possible method just to add a
{@link #checkError()} call.<br>
Note that we should not call {@link #checkError()} for {@link GL#glGetError()}, it doesn't make sense.<br>
Note that this class is general purpose and as such every class instance (every object) can be guarded as long as
the passed gl instance is valid.

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