[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error handling.
Hendrik Boom wrote:
> My experience -- with many compilers over many decades -- is that this
> is not a good idea. It is best to write out messages as soon as errors
> are detected, and flush the buffer after each one. Many Many times
> I've had a compiler crash for one reason or another (parhaps because of
> an inconsistent state caused by the very error it detected)
> and as a result the messages are lost.
But there are clear advantages to the buffered message approach as well (notably
in being able to interleave messages from different passes in source order).
What if the buffer flush were handled in exception unwind (or indeed in buffer
finalisation)? Then unless the VM were destabilised - which shouldn't (ha ha)
happen, the truth would still out....
stephen p spackman <email@example.com>