[vtk-developers] Re: [vtkusers] Unconnected filter(s) causing seg faults
Charl P. Botha
c.p.botha at ewi.tudelft.nl
Thu Oct 16 11:17:15 EDT 2003
N Smethurst wrote:
> I just went through the Graphics directory and found about 4/5 without
> checks. I put the list at
>
> kvisualiser.free.fr/vtk/null_input_check
>
> if you're interested in looking at it. There are about 100 without checks.. I
> haven't checked any other directories.
I had a look at your list. It's much longer than I thought...
> How should the checks be implemented? I noticed that in the methods that do
> check, some do this
>
> if (input == NULL)
> {
> vtkErrorMacro(<<"Input is NULL");
> return;
> }
>
> whilst others just do a
>
> if (input == NULL)
> {
> return;
> }
Personally I prefer the first form. At the very least we should keep
the error message consistent so that it can be filtered if the
programmer requires that.
In anycase, let's wait a short while for some comments from some of the
other developers as well.
Comments, any other developers?
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtk-developers
mailing list