[vtk-developers] patch for turning (almost) all VTK errors into Python exceptions, IMPROVED
David Gobbi
dgobbi at atamai.com
Tue Aug 8 11:35:01 EDT 2006
Charl P. Botha wrote:
> On 8/8/06, David Gobbi <dgobbi at atamai.com> wrote:
>> I just want to make sure that an app that uses VTK's built-in main loop
>> (i.e. that
>> doesn't use a separate GUI toolkit) will also return to the main loop
>> after an
>> exception.
>
> I just checked with the VolumeRenderWithBoxWidget.py example and
> modified the EndInteractionEvent to perform a VTK action that
> generates an exception. The application simply continues when this
> happens, as expected.
>
> The code simply results in a Python exception, not a C++-exception.
> Python exceptions in general don't result in application exit if
> they're not explicitly handled, AFAICR.
>
> Also remember that the old behaviour can be reinstated with:
> ow = vtk.vtkOutputWindow()
> ow.SetInstance(ow)
>
> So far, I haven't been able to think of any serious drawbacks to this
> vtkPythonOutputWindow approach.
Thanks for checking. I'm convinced, I vote for commit.
- David
More information about the vtk-developers
mailing list