On May 8 2011, Janne Blomqvist wrote:

It's theoretically insoluble, given the constraints you are working
under.  Sorry.  It is possible to do reasonably well, but there will
always be likely scenarios where all you can do is to say "Aargh!
I give up."

Well, I realize perfection is impossible, so I'm settling for merely
improving the status quo!

Very reasonable, given the problem.  Where the effort increases rapidly
with the reliability, not being too fancy is a sound strategy.

I think in our case the situation is a bit easier in that we're not
trying to recover from a serious failure, merely print some diagnostic
information without getting stuck in a deadlock.

I wasn't trying to do much more!  I was mainly trying to maximise the
chances of files being closed cleanly and appropriate diagnostics
being produced.  Once there was a serious error, I didn't allow the
program to continue.  But I did allow user-written exception handlers
(which could only return - NOT jump out).  Even that was hard enough :-(

Regards,
Nick Maclaren.




Reply via email to