comp.lang.ada
 help / color / mirror / Atom feed
From: Geoff Bull <geoff@research.canon.com.au>
Subject: Re: F9X twister & ADA (was: n-dim'l vectors)
Date: 2000/04/12
Date: 2000-04-12T04:13:22+00:00	[thread overview]
Message-ID: <38F3F803.A4A56259@research.canon.com.au> (raw)
In-Reply-To: 85SI4.4008$fV.338113@bgtnsc05-news.ops.worldnet.att.net

James Giles wrote:
>  How do you *not* provide a
> handler when you don't even know what it is that you're trying
> not to handle?

Documentation, tools and testing.

> 
> In any case, for most of my own code I much prefer halting
> immediately. 
You might prefer it, but I don't. Forced halting would suck
from my point of view.

> Most "graceful" termination involves doing
> things that cover up evidence that might be needed to discover
> the cause of the fault (closing files, deleting temporaries, leaving
> the program counter and/or the registers in different states than
> the context in which the error arose, etc.).  It's only for code
> written for naive public consumption that "graceful" termination
> is appropriate.

Actually, in my case the point of flushing files is to *not* throw away 
the evidence of where the program was up to when it crashed.
Also graceful termination might be disabling of an impending missile
launch, or doing a retry using a backup system,
or sending a failure notice to a remote system.

> >>  Mystically skipping over several
> >> levels of the call tree is messy.
> >
> >I don't understand what you mean here.
> 
> I can't see any opportunity for confusion here.  

Ada exceptions are neither mystical nor messy, so I thought
you must be talking about something else.


>  Yes, this means that when you add code which may
> raise exceptions to a procedure, you have to recompile (and maybe
> even rewrite) code which uses that procedure.  This is no different
> than any other case in which you changed a procedure in a way
> in which its public (interface) properties have changed.

Going back to your earlier example, if you decided to raise 
an exception in Z and you really did want to handle it in A 
(because of requirement of graceful operation for naive users),
you would have to go back and modify procedures B .. Y to
either handle or pass on the exception.


>  Or, are
> you claiming that an exception is not a public property of the
> procedure which raises it?
No.
I agree with your sentiments.
But I can't think of a workable implemetation.
Certainly the way Java does it can be a headache.
Other difficulties with Java style exceptions
in Ada have been previously discussed in comp.lang.ada.

Cheers
Geoff




  reply	other threads:[~2000-04-12  0:00 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8cctts$ujr$1@nnrp1.deja.com>
     [not found] ` <38EA0440.1ECBC158@ncep.noaa.gov>
2000-04-06  0:00   ` F9X twister & ADA (was: n-dim'l vectors) bv
2000-04-06  0:00     ` Richard Maine
2000-04-07  0:00       ` Brian Rogoff
2000-04-08  0:00         ` Dick Hendrickson
2000-04-08  0:00           ` Richard Maine
2000-04-09  0:00             ` Gary Scott
2000-04-09  0:00               ` Richard Maine
2000-04-09  0:00           ` Geoff Bull
2000-04-09  0:00             ` Dick Hendrickson
2000-04-09  0:00               ` Robert Dewar
2000-04-09  0:00                 ` Gordon Sande
2000-04-09  0:00                   ` James Giles
2000-04-10  0:00                 ` tmoran
2000-04-15  0:00                 ` Aidan Skinner
2000-04-17  0:00                   ` Robert I. Eachus
2000-04-16  0:00                 ` Ken Garlington
2000-04-12  0:00               ` Robert I. Eachus
2000-04-10  0:00       ` bv
2000-04-10  0:00         ` James Van Buskirk
2000-04-11  0:00         ` James Giles
2000-04-11  0:00           ` Dale Stanbrough
2000-04-11  0:00             ` James Giles
2000-04-12  0:00               ` Robert A Duff
2000-04-11  0:00           ` Geoff Bull
2000-04-11  0:00             ` James Giles
2000-04-11  0:00               ` Larry Kilgallen
2000-04-11  0:00                 ` James Giles
2000-04-11  0:00                   ` Larry Kilgallen
2000-04-12  0:00                   ` Robert A Duff
2000-04-12  0:00               ` Geoff Bull
2000-04-12  0:00                 ` James Giles
2000-04-12  0:00                   ` Geoff Bull [this message]
2000-04-12  0:00                     ` James Giles
2000-04-12  0:00                       ` Geoff Bull
2000-04-12  0:00                         ` Marin D. Condic
2000-04-12  0:00                           ` James Giles
2000-04-12  0:00                           ` James Giles
2000-04-12  0:00                         ` James Giles
2000-04-13  0:00                           ` Geoff Bull
2000-04-13  0:00                             ` James Giles
2000-04-14  0:00                               ` Geoff Bull
2000-04-13  0:00                             ` Debugging (was: F9X twister & ADA) James Giles
2000-04-14  0:00           ` F9X twister & ADA (was: n-dim'l vectors) bv
2000-04-07  0:00     ` Erik Edelmann
2000-04-07  0:00       ` Robert Dewar
2000-04-07  0:00         ` Erik Edelmann
2000-04-07  0:00     ` Paul van Delst
2000-04-10  0:00       ` bv
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox