errorDialog - how reliable?

Richard Gaskin ambassador at fourthworld.com
Thu Oct 9 05:27:01 EDT 2003


Alex Rice wrote:

> How is it possible for errorDialog messages to vanish & how
> can I make sure it never happens in my built apps? I am still learning
> the best ways to think and code in transcript. Having programmed in
> Java I have a particular concept of how exception handling is supposed
> to work.
> 
> To quote Stroustrup on exception handling
> 
> "Successful fault-tolerant systems are multilevel. Each level copes
> with as many errors as it can without getting too contorted and leaves
> the rest to higher levels."
> 
> In my case "higher levels" means the IDE or the runtime engine. If the
> runtime tosses exceptions- errorDialog messages- into the great bit
> bucket where does that leave me? Back to square 1 and ready to rip
> every single throw statement out of my code.
> 
> Exceptions are for *very unusual situations*. Should very unusual
> situations be met with complete silence?

This must be the week for Stroustrup  quotes:  I included one in my Handy
Handlers column at revJournal.  ;)

You picked a good one, and I think it's a desirable goal.  But it may take a
while.

The very thing we love about Rev comes to bite us on exception handling: as
4GLs go it's among the most powerful, but few 4GLs provide the sort of
debugging tasks Rev does written in the 4GL itself.  It's not just that the
patient is squirming, it's the patient himself who's holding the scalpel.

One thing that may be worth trying would be to see if you get similar
behavior in the MC IDE.  I wouldn't suggest you move your work to that
environment, just to try to reproduce the problem there to determine the
extent to which the issue may be specific to the IDE.

FWIW, unless you're working on something that involves debugging scripts I
believe you can have reasonaable confidence in having a much better chance
of catching every error.  Debugging scripts with a scripted debugger and
scripted error handling is inevitably among the more complicated things the
engine ever has to do.  I suspect with your dilligence your standalones will
be provide graceful degredation for 99.9% of the errors that occur; the
other 0.1% is for your v1.1. ;)

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the Use-livecode mailing list