Improve GL error handling.