Mark Thorson <
nos...@sonic.net> writes:
> When running the application, you need to
> cope with errors, not diagnose them. ...
> ...
> If the application is a heart-lung machine,
> the one thing you can't do is terminate.
> You have to keep going, so you have to test
> for and handle all errors in your program.
In your example, I would agree. However, I believe it depends
on the application. A compiler should abort, rather than
producing bad code, or allowing an invalid construct. An
editor or IDE should abort rather than possibly messing up
user code. Etc.
At my last job, YottaYotta (a distributed storage company
that got bought by EMC), I worked on several components
of the software running on the storage blades. Our code had
lots of asserts in it. We had a test team that ran hours
of testing, trying out all sorts of failure modes, like
cycling switch ports on and off, killing and rebooting nodes,
etc. Hours of running with racks of equipment. Most of the
tests involved full-bore I/O with data correctness testing.
One of the big reasons we did things that way is that the
very last thing a storage system should do is to silently
corrupt user data. Since our system was designed to have
backup blades at all sites, the right thing to do when
detecting an inconsistency (assert) is to reboot the blade,
and let the recovery code bring things back to normal. Many
of the problems with distributed systems like that are very
timing dependent, so on a reboot it was unlikely that the
same assert would fire. One of our common problems as
developers was to find ways to reproduce reported asserts.
And, get very good at interpreting multiple trace records!
--
Chris Gray