GL_INVALID_VALUE should be generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.
Does not cache states in glGetBoolean calls.
GL_INVALID_VALUE should be generated if shader is not a value generated by OpenGL and
GL_INVALID_OPERATION should be generated if shader is not a shader object.
glUseProgram should throw GL_INVALID_OPERATION error if program could not be made part of current state.
If the program is 0 or was not generated by OpenGL, others opengl implementations are returning GL_INVALID_VALUE