comp.lang.ada
 help / color / mirror / Atom feed
From: "James Giles" <jamesgiles@worldnet.att.net>
Subject: Re: F9X twister & ADA (was: n-dim'l vectors)
Date: 2000/04/12
Date: 2000-04-12T00:00:00+00:00	[thread overview]
Message-ID: <nr2J4.959$PV.54195@bgtnsc06-news.ops.worldnet.att.net> (raw)
In-Reply-To: 38F492A7.997140CF@quadruscorp.com


Marin D. Condic wrote in message <38F492A7.997140CF@quadruscorp.com>...
>Geoff Bull wrote:
>> >  I still prefer to quit *immediately*.
>> You missed my point.
>> Depending on the situation different users will have different needs.
>> Quit immediately simply isn't appropriate in may situations,
>> even if it happens to be perfect for you.
>>
>I'm with you. Core dumps and such are interesting when you are in
>program development mode and you need information about where something
>terminated, etc. But in production mode, core dumps are at minimum
>impolite. [...]


Gee, I guess you missed earlier in this thread when I said:

>In any case, for most of my own code I much prefer halting
>immediately.  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.  And yes, in this case a clear message is
>important.

Any code I write myself (or any "in-house" code) is in the
presence of the developer(s).  If there's an error, the proper
course of action to take depends on who's running the program.
If it's my own code, the proper action is to preserve as much
information about the failure as possible - in order that I can
fix it.

I'm sorry if you missed the fact that there are two aspects of
this thread.  First, there is the claim that it's *never* desirable
to halt immediately, that I disagree with.  Second, there is the
claim that, when you *are* going to catch the error and "gracefully"
terminate, having the raised exception be handled by a non-specified
(and often completely surprised) exception handler is desirable.

"Completely surprised" did I say?  Yes.  In the earlier example,
suppose procedure Z raises an exception that A has an active
handler for.  The author of A as I specified, is a different person
than the author of Z.  In fact the author of A is using a library written
by some third party who wrote neither A nor Z.  Z is only present at
the end of a long dependency chain through several libraries written
by different people.  If the author of A wrote a handler for a given
exception, it was almost certainly to handle a problem that he knew
might arise *in* A.  The message written by the handler (or other
remedial action) will be written under the assumption that the
cause of the exception was the expected possibility within A.
Later, when debugging the problem, the author of A will be
completely surprised that the exception came, in this case, from
Z (a procedure which the author of A had no prior knowledge
of at all).

--
J. Giles






  parent 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
2000-04-12  0:00                     ` James Giles
2000-04-12  0:00                       ` Geoff Bull
2000-04-12  0:00                         ` James Giles
2000-04-13  0:00                           ` Geoff Bull
2000-04-13  0:00                             ` Debugging (was: F9X twister & ADA) James Giles
2000-04-13  0:00                             ` F9X twister & ADA (was: n-dim'l vectors) James Giles
2000-04-14  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 [this message]
2000-04-14  0:00           ` 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