add decorator for catching glfw errors