Maybe try listening for ErrorEvent on the vtkOutputWindow::GetInstance() object? (If there is no handler for the ErrorEvent on the specific object, then the output window is called to display error text and it also emits an ErrorEvent...)<div>
<br></div><div>HTH,</div><div>David</div><div><br><br><div class="gmail_quote">On Fri, Nov 7, 2008 at 9:41 AM, Dominik Szczerba <span dir="ltr"><<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks a lot, Goodwin already suggested this solution independently, but the thing is it is an object inside the filter that emits this event, and the filter is not catching it. Observing the filter did not help me here - or is there a way to enable 'recursive' events?<br>
with regards,<br><font color="#888888">
Dominik</font><div class="Ih2E3d"><br>
<br>
Amy Squillacote wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Dominik,<br>
<br>
From looking at the code in vtkSetGet.h for vtkErrorMacro, it seems that if something is observing the "ErrorEvent", then that event is invoked. Perhaps you could add an observer to the filter that has this problem -- specifically listening for the "ErrorEvent". Then you could exit gracefully in your event handler.<br>
<br>
- Amy<br>
<br>
Dominik Szczerba wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for a hint, but I need to handle this case in a release version (no debugger). I looked up the vtkErrorMacro and it indeed calls BreakOnError() at the end. Is there a chance to attach own code there?<br>
<br>
Thanks,<br>
Dominik<br>
<br>
Goodwin Lawlor wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dominik Szczerba wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a way to stop execution after vtkErrorMacro?<br>
I get a malloc failure in a VTK filter that is not checked for in the parent calling stack... (bug report due). pointer==0 is detected (if ptr==0 vtkErrorMacro... return 0) but execution continues (leading into bushes).<br>
If not, what do I do to exit gracefully on a malloc quit?<br>
</blockquote>
<br>
Hi Dominik,<br>
<br>
You can place a debugger break on vtkObject::BreakOnError()<br>
<br>
hth<br>
<br>
Goodwin<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
-- <br></div><div class="Ih2E3d">
Dominik Szczerba, PhD<br>
Computational Physics Group<br>
IT'IS Foundation for Research<br>
<a href="http://www.itis.ethz.ch" target="_blank">http://www.itis.ethz.ch</a><br>
_______________________________________________<br></div><div><div></div><div class="Wj3C7c">
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>