[vtk-developers] Exceptions in Tcl wrapping
Steve Pieper
pieper at bwh.harvard.edu
Thu Jan 6 09:07:21 EST 2005
Hi Andy -
The version of exception handling that we put into the vtk tcl wrapping
has been a huge help already, particularly for ITK code wrapped in VTK.
I don't know of any downsides.
-Steve
Andy Cedilnik wrote:
> 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.
>
More information about the vtk-developers
mailing list