[vtkusers] Avoiding program crashing when an algorithm does

John Drescher drescherjm at gmail.com
Tue May 15 13:41:05 EDT 2012


On Tue, May 15, 2012 at 12:37 PM, David Doria <daviddoria at gmail.com> wrote:
> Hi John,
>
> This seems like a nice thing to be able to do. I tried to make a demo
> (attached), but when I force the segfault (by dereferencing a null pointer)
> the program still crashes.
>
> Surely I am doing something wrong as I don't have any idea what the notify()
> function does - any suggestions?
>

This is a place to catch thrown exceptions globally in your
application. I do not think it will normally catch null pointer or
other non c++ exceptions. Although with Visual Studio and some work
you can get the compiler to throw these as C++ exceptions and these
can be caught. Something like this MFC example:
http://www.codeproject.com/Articles/422/SEH-and-C-Exceptions-catch-all-in-one



John



More information about the vtkusers mailing list