comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: GNAT exception traceback
Date: 1997/06/17
Date: 1997-06-17T00:00:00+00:00	[thread overview]
Message-ID: <EBxu4z.GFI@world.std.com> (raw)
In-Reply-To: dewar.866540788@merv


In article <dewar.866540788@merv>, Robert Dewar <dewar@merv.cs.nyu.edu> wrote:
>First: The slient disappearence of exceptions raised in tasks is *required*
>by the Ada language. The semantics of an unhandled exception is that it
>silently terminates the task in which it appears if this is not the
>environment task. This is not considered an error by the language definition.

Quite true -- the semantics of Ada is that it's not an error to have an
unhandled exception in a task.  Nonetheless, I think the default
behavior of all Ada implementations should be to print out an error
message (including a stack trace-back) when this happens.  You could
even get away with making this the *only* behavior -- nothing in the Ada
RM says the implementation can't print out interesting information
whenever it likes.  I'd be reluctant to go that far, however, because
somebody, somewhere is probably depending on this "silent" behavior.

Given an implementation that doesn't do the nice thing above, one should
put something like "when X: others => Report_Error(X);" at the bottom of
every task.

>(Note: I personally think this is an annoying little mistake in the definition
>of the language, what would be so terrible in requiring programmers to write
>
>   when others => null;
>
>at the top level of a task, if you really want this [typically undesirable]
>behavior?)

Strongly agree.

>That being said, in practice, for programs which do not use Constraint_Error
>as a control structure in the program (one would hope that would be nearly
>all programs, but sadly this is not the case), considering Constraint_Error
>to be always fatal is a very reasonable idea.

In *my* programs, Assertion_Failure is more common than
Constraint_Error, when a bug happens.

- Bob




  reply	other threads:[~1997-06-17  0:00 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-13  0:00 GNAT exception traceback Huy Vo
1997-06-13  0:00 ` Robert Dewar
1997-06-16  0:00   ` wiljan
1997-06-17  0:00     ` Robert Dewar
1997-06-17  0:00       ` Robert A Duff [this message]
1997-06-19  0:00         ` Michael F Brenner
1997-06-17  0:00       ` Spam Hater
1997-06-17  0:00         ` Corey Minyard
1997-06-17  0:00           ` Spam Hater
1997-06-18  0:00             ` Corey Minyard
1997-06-18  0:00               ` Spam Hater
1997-06-18  0:00                 ` Tom Moran
1997-06-20  0:00                   ` Robert Dewar
1997-06-19  0:00                 ` Corey Minyard
1997-06-20  0:00                 ` Richard Kenner
1997-06-20  0:00                 ` Robert Dewar
1997-06-18  0:00         ` Richard Kenner
1997-06-23  0:00   ` Geert Bosch
1997-06-27  0:00     ` Michael F Brenner
1997-07-02  0:00     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1997-06-19  0:00 Chris Sparks (Mr. Ada)
1997-06-16  0:00 Chris Sparks (Mr. Ada)
1997-06-16  0:00 ` Robert Dewar
1997-06-11  0:00 Steve Gibson
1997-06-12  0:00 ` Robert Dewar
1997-06-13  0:00   ` Mats.Weber
1997-06-14  0:00     ` Robert Dewar
1997-06-16  0:00       ` Mats.Weber
1997-06-16  0:00         ` Fergus Henderson
1997-06-16  0:00         ` Robert Dewar
1997-06-16  0:00     ` Gautier
1997-06-17  0:00       ` Robert Dewar
1997-06-14  0:00   ` Aaron Metzger
1997-06-14  0:00     ` Robert Dewar
1997-06-14  0:00       ` Robert A Duff
1997-06-16  0:00       ` Spam Hater
1997-06-17  0:00         ` Robert Dewar
1997-06-17  0:00         ` Robert Dewar
1997-06-16  0:00       ` Corey Minyard
1997-06-16  0:00     ` Spam Hater
1997-06-17  0:00       ` Robert Dewar
1997-06-19  0:00         ` Geert Bosch
1997-06-18  0:00       ` Samuel Tardieu
1997-06-18  0:00       ` Richard Kenner
1997-06-14  0:00 ` Martin Kristensson
1997-06-14  0:00   ` Robert Dewar
     [not found] <82@pluto.win-uk.net>
1996-02-17  0:00 ` GNAT : Exception traceback Robert Dewar
replies disabled

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