That's a good point, but my opinion is that letting an unhandled exception fall through serves no purpose whatsoever. The system doesn't tell you where that unhandled expection occured, either in the error box (Windows), or the core dump (UNIX/Linux), or that it was even an unhandled exception that caused the program to crash in the first place. If anything, you can always just do the following:
Quote:
catch( ... )
{
printf( "Abnormal termination: Unhandled exception in main()" );
}
|
or write the error to a log file, or to sterr, or whatever.
In the end, I guess it's up to the developer to make the decision, but experience has taught me that unhandled exceptions that fall through can be a headache to debug. And ideally, a well written piece of code should have a catch() for
all thrown exceptions, but this method handles the 'just in case".