BUGRPT: VTK 3.1 & Python callbacks

Randall Hopper aa8vb at yahoo.com
Thu May 18 14:15:06 EDT 2000


David Gobbi:
 |Randall Hopper:
 |> David Gobbi:
 |>  |  if (PyErr_Occurred())
 |>  |    {
 |>  |    PyErr_Print();
 |>  |    }
 |> 
 |> Thanks.  I get that stack trace now.
 |> 
 |> This won't propagate the error though, will it?  Is there a mechanism to
 |> fail an object and the pipeline in the VTK internals?
 |
 |Feel free to contribute a better fix.  The Python/C API docs come
 |with the standard python distribution.  

This wasn't meant as criticism.  It was more a question about VTK
architecture than Python error handling details.

I was thinking in terms of, does VTK expose a visible success/failed status
when the pipeline detects a error.  This is something I don't know.  I know
I've seen plenty of pipelines fail and print errors, but I don't know if
error detection and recovery is supported via the API.

I also don't know if aborting pipeline execution due to an error is
supported.  In this case for instance, the downstream module from the
Source executes as well, and of course reports that it has no input data
(because the Source execution failed).

If pipeline success/failed status isn't exported, then your fix looks like
the best one.  Unless it's generally supported, there's no reason to bother
with propagating the error across the C layer to where we return to Python
(where we would then PyErr_Format to set an error message and return NULL
to Python to raise an exception).

Thanks,

Randall

-- 
Randall Hopper
aa8vb at yahoo.com
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list