PDA

View Full Version : How can I manage an unexpected program crash?



cydside
21st August 2009, 21:50
Hi to all,
Should you suggest a way?
I'm looking for something beyond the use of "try" and "catch", when the crash happens due the OS and escape the conventional C++ tools.
Thanks.

caduel
22nd August 2009, 07:59
not too much you can do. you might install a signal handler and print a stacktrace.
you might wrap the eventloop with a try-catch-block so that an (unhandled) exception during event handling won't crash your app but only terminate that event. (Of course you need to write exception safe code.)