[Paraview-developers] Handling exceptions from within a Plug-in

Mathieu Westphal mathieu.westphal at kitware.com
Fri May 13 09:05:43 EDT 2016


Hello

vtkErrorMacro is the way to go to inform the user of the error, but it will
not exit the method, only inform.
After that you need to return 0 if you want the pipeline execution to stop.

Regards,




Mathieu Westphal

On Fri, May 13, 2016 at 2:54 PM, Ellon Paiva <ellonpaiva at gmail.com> wrote:

> Hello Mathieu,
>
> Thanks for your answer.
>
> I think I was not clear in my question. Surely I can catch the exception
> in the plugin, but I'm looking for a way to inform paraview that an error
> occurred while executing the filter. Of course this information should be
> passed to ParaView when handling the exception, and probably it should halt
> the processing of the pipeline as well.
>
> I'm looking now into the files of some plugins inside paraview source. I
> found that some plugins use the macro "vtkErrorMacro". Would this work for
> me?
>
> Regards,
>
> Ellon
>
>
> On 05/13/2016 02:47 PM, Mathieu Westphal wrote:
>
> Hello
>
> I supose it's kind of obvious, but why would catch not work ? you should
> be able to catch your library exception in your filter.
>
> Regards,
>
> Mathieu Westphal
>
> On Fri, May 13, 2016 at 2:39 PM, Ellon Paiva <ellonpaiva at gmail.com> wrote:
>
>> Hello all,
>>
>> I have a plug-in for paraview that wraps filters from an specific
>> library, and these filters that may throw exceptions when if not configured
>> properly (example, if the input data doesn't have some fields). I've been
>> looking for a way to catch these exceptions inside the plug-in and inform
>> paraview about the error/problem, like for example showing the error
>> information in the paraview error window, but I couldn't find an
>> explanation of how to do that. Could anyone explain me how to do that or
>> show an example of code for that?
>>
>> Regards,
>> Ellon
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> <http://www.kitware.com/opensource/opensource.html>
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at:
>> http://markmail.org/search/?q=Paraview-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160513/15f87ff0/attachment.html>


More information about the Paraview-developers mailing list