How to catch errors in VTK

This example may help…
https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/ObserveError/