Darren New wrote:
Christopher Smith wrote:
Well, few languages fully protect you from all the mistakes you make

No, of course they don't. But there are other languages that when you make a coding error, you can catch it at the top level and recover enough to say what failed and restart yourself.
If it is an "unexpected error" it is difficult to be sure you've recovered "enough" from a problem. All you can do is best effort.
As someone who supports exactly such a system, on that has more C and C++ in it than I'd like it to, it is entirely possible for such a system to recover from unexpected problems.

Can you recover from unexpected coding errors? Like, can your C++ program dump a stack trace when one of the threads does a SEGV and email it to you, then restart that thread perhaps?
No, unfortunately it can't. You got me there.

Instead it stores a core file, logs a notice of the problem and where the core file is, and then restarts the process. The logging system will alert me via e-mail, but is careful to avoid spamming my mailbox when this fails to resolve the problem. C++ is a very limited technology, so this is the best that we can do. ;-)

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to