Catching opengl errors

vtkOutputWindow (or its specific sub-class) invokes the vtkCommand::ErrorEvent when an error like the one you show is triggered. This means you’d have to provide an output window and set up observers for that instance.