[vtk-developers] RFC: PATCH for exception handling in vtkWrapPython.c

Ken Martin ken.martin at kitware.com
Mon Mar 1 17:34:32 EST 2004

VTK doesn't throw exceptions so I'm not sure I understand the logic of
wrapping all the VTK calls (Python wrapped) with Try Catch. I'm not saying
I'm against this I just want to understand the alternatives. For example, as
I understand it the problem here is that the invocation from Python is to
VTK, which then invokes ITK through the VTK/ITK interface classes. ITK
throws and nothing catches. Why not modify the ITK->VTK class to try/catch
around its invocations of ITK and then display the exception as a vtkError?
This has the advantage of addressing the problem for all wrapped languages
and C++ as well without much bloat. What are the disadvantages of that


More information about the vtk-developers mailing list