Error handling

Hi,

What is the best way to handle VTK errors while chaining multiple VTK filters?

  • Use vtkErrorCode to add specific error code and then do

const bool result = filter->GetErrorCode() == vtkErrorCode ::NoError; //continue or handle error

I only saw VTK readers/writers using them, but I’m wondering if I could use SetErrorCode in my own custom filters.

thanks