Error derived from Exception is WRONG, DAMNIT
downs
default_357-line at yahoo.de
Sat Mar 1 03:30:58 PST 2008
Why is Error, in 2.0, _STILL_ derived from Exception?
I understand that this has come up before, which makes it all the more confusing that it's _STILL_ not fixed. And make no mistake, this isn't just a matter of semantics, but an actual bug causing actual problems, such as unexpected crashes.
Let's see, the only use of making unrecoverable Errors a *special case* of recoverable Exceptions would be, um, if you wanted to catch unrecoverable Errors only ...
Does anybody else see a problem with that statement? Like, that you're not supposed to catch unrecoverable errors in the first place?
The problem with this ordering is that you end up _accidentally_ catching unrecoverable errors, which in turn leads to maybe not even noticing some critical error in debug mode, which in turn leads to different behavior between debug mode and release mode, such as mysterious, unexpected segmentation faults (say on Array Bounds Violation). I don't have to explain why this is a bad thing.
Could this be changed? _Please_?
--downs, slightly agitated :)
More information about the Digitalmars-d
mailing list