[vtkusers] Re: [vtk-developers] patch for turning (almost) all VTK errors into Python exceptions, IMPROVED

Charl P. Botha cpbotha at cpbotha.net
Tue Aug 8 12:49:41 EDT 2006


On 8/8/06, Charl P. Botha <cpbotha at cpbotha.net> wrote:
> So far, I haven't been able to think of any serious drawbacks to this
> vtkPythonOutputWindow approach.

One caveat: if a single VTK method call results in multiple
vtkErrorMacro calls, only the first one will be transformed into an
exception (by design).   Remember that the exception can only happen
when the VTK method call returns.

In order to create a mechanism whereby all error messages can still be
logged, I would propose also having the vtkPythonOutputWindow emit an
ErrorEvent (and WarningEvent for Warnings), so that users have the
option of still capturing all output.  I'll modify the code.



More information about the vtkusers mailing list