<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello again Mathieu,<br>
    <br>
    Nenermind my last email: vtkErrorMacro works as expected. :)<br>
    <br>
    Thank you for your help!<br>
    <br>
    Best regards,<br>
    Ellon<br>
    <br>
    <div class="moz-cite-prefix">On 05/13/2016 03:41 PM, Ellon Paiva
      wrote:<br>
    </div>
    <blockquote cite="mid:5735D987.2050107@gmail.com" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Mathieu,<br>
      <br>
      I tried the vtkErrorMacro and I got the messages being printed in
      the standard error in the terminal, which is not exactly what I
      want.<br>
      <br>
      What I am looking for is something like it's shown in the attached
      image: here I forced an error in a python programable filter
      through a syntax error in the script. As you can see the user get
      an information about the error in the "Output Messages" window
      that pops up when "Apply" is pressed, as well as in the terminal.
      How could I print the error message in this Output Window on
      ParaView?<br>
      <br>
      Regards,<br>
      <br>
      Ellon<br>
      <br>
      <br>
      <div class="moz-cite-prefix">On 05/13/2016 03:05 PM, Mathieu
        Westphal wrote:<br>
      </div>
      <blockquote
cite="mid:CAC2t4URaqQada464w3eEhS=52Z8hSo1UnnnDruQg0__F2zNe1Q@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div>
            <div>Hello<br>
              <br>
              vtkErrorMacro is the way to go to inform the user of the
              error, but it will not exit the method, only inform. <br>
              After that you need to return 0 if you want the pipeline
              execution to stop.<br>
            </div>
            <br>
          </div>
          Regards,<br>
          <div><br>
            <div><br>
              <br>
            </div>
          </div>
        </div>
        <div class="gmail_extra"><br clear="all">
          <div>
            <div class="gmail_signature">
              <div dir="ltr">Mathieu Westphal<br>
              </div>
            </div>
          </div>
          <br>
          <div class="gmail_quote">On Fri, May 13, 2016 at 2:54 PM,
            Ellon Paiva <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:ellonpaiva@gmail.com" target="_blank">ellonpaiva@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> Hello Mathieu,<br>
                <br>
                Thanks for your answer.<br>
                <br>
                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.<br>
                <br>
                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?<br>
                <br>
                Regards,<br>
                <br>
                Ellon
                <div>
                  <div class="h5"><br>
                    <br>
                    <div>On 05/13/2016 02:47 PM, Mathieu Westphal wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div>Hello<br>
                            <br>
                          </div>
                          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.<br>
                          <br>
                        </div>
                        Regards,<br>
                      </div>
                      <div class="gmail_extra"><br clear="all">
                        <div>
                          <div>
                            <div dir="ltr">Mathieu Westphal<br>
                            </div>
                          </div>
                        </div>
                        <br>
                        <div class="gmail_quote">On Fri, May 13, 2016 at
                          2:39 PM, Ellon Paiva <span dir="ltr"><<a
                              moz-do-not-send="true"
                              class="moz-txt-link-abbreviated"
                              href="mailto:ellonpaiva@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:ellonpaiva@gmail.com">ellonpaiva@gmail.com</a></a>></span>
                          wrote:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">Hello all,<br>
                            <br>
                            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?<br>
                            <br>
                            Regards,<br>
                            Ellon<br>
_______________________________________________<br>
                            Powered by <a moz-do-not-send="true"
                              href="http://www.kitware.com"
                              rel="noreferrer" target="_blank">www.kitware.com</a><br>
                            <br>
                            Visit other Kitware open-source projects at
                            <a moz-do-not-send="true"
                              class="moz-txt-link-freetext"
                              href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
                            <br>
                            Search the list archives at: <a
                              moz-do-not-send="true"
                              class="moz-txt-link-freetext"
                              href="http://markmail.org/search/?q=Paraview-developers"><a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=Paraview-developers">http://markmail.org/search/?q=Paraview-developers</a></a><br>
                            <br>
                            Follow this link to subscribe/unsubscribe:<br>
                            <a moz-do-not-send="true"
                              href="http://public.kitware.com/mailman/listinfo/paraview-developers"
                              rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>