[vtkusers] vtkGenericDataObjectReader, error handling

Michal Szostakiewicz creed at icm.edu.pl
Mon Apr 22 09:41:53 EDT 2013


Dear Bill!

Thanks so much for your answer! (although I must say I'm a little bit
surprised there is no other way to check that)

I looked at this ErrorObserver class, but is there any way to use this
technique in Java wrapper?

What I basically need is just to "ignore" all the errors... Maybe there is
some "built-in" vtkCommand to do that?


Best regards,
Michał

> Unfortunately, it looks like there is no way to know if the file can be
> read. You can try to catch the vtkError. This example may be helpful:
> http://vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ObserveError
>
> Bill
>
>
>
> On Fri, Apr 19, 2013 at 5:19 AM, Michal Szostakiewicz
> <creed at icm.edu.pl>wrote:
>
>> Hi!
>>
>> When I use vtkGenericDataObjectReader (or any other reader), how can I
>> check if the file I'm opening is a proper file?
>>
>> Method SetFileName() runs just fine, but then when I call Update() or
>> GetOutput() it prints a bunch of errors (on Windows it's even worse,
>> because it creates a separate window for them).
>>
>> So how can I check if user chose a valid VTK file?
>>
>>
>> Best regards,
>> Michał
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>




More information about the vtkusers mailing list