This looks fragile. Could GLEW.errorString() itself read isLinaroFork and return null on an unknown error, so that we don't need to set here error = 8; to denote a magic value for unknown error? Or alternatively if isLinaroFork==true, GLEW.errorString() would get monkeypatched to a linaro-enabled form?