[vtk-developers] Exceptions in Tcl wrapping

Andy Cedilnik andy.cedilnik at kitware.com
Thu Jan 6 08:44:16 EST 2005


Hi All,

I am considering adding exceptions to Tcl wrappings and maybe to other
ones. The way they would work is that if you invoke VTK method that
throws exception, the tcl wrapping would catch the exception and report
it as a Tcl error. This way you can gracefully exit application in case
of running out of memory or something similar.

The exception handling code will be placed to vtk*CppCommand around the
if's that determine the method called. This way there is a single
try/catch block per vtk*Tcl.cxx file, which means no issues compile time
and run time performance, and I don't think any other code should be
affected.

Let me know if there are any issues with this. If the code is
acceptable, I intend to backport it to VTK 4.4.

Also, I am considering adding the same code to Python wrapping if there
is any interest.

-- 
Andy Cedilnik
Kitware Inc.




More information about the vtk-developers mailing list