comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re: Exceptions in Declarative Region
Date: 13 Aug 93 03:27:22 GMT	[thread overview]
Message-ID: <1993Aug13.032722.21357@seas.gwu.edu> (raw)

In article <1993Aug12.223413.20295@scf.loral.com> bashford@scf.loral.com (Dave 
Bashford) writes:
>In article ... rgilbert@orl.mmc.com writes:
>>The LRM (11-4.2a) specifies that exceptions that occur in the
>>decarative portion are propagated up to the calling procedure
>>and not handled by the current function's exception handler.
>>
>>Can somebody provide the rationale for this?  Why shouldn't the
>>exception handler for a procedure/function not include the
>>declarative portion?
>>
>>                           Bob 
>
>And a related question: How does a program handle exceptions raised
>in the elaboration of global packages and main procedures ?

It doesn't and can't. The LRM is quite clear on this one: "the main
program is abandoned," i.e. crashes. How can Main even get started if
the context created by its own declarations and the packages its WITHs
can't be set up? Better to just crash Main. The alternative is much worse.

I doubt that any language with a block structure could do better.

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman -  co-chair, SIGAda Education Committee
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University -  Washington, DC 20052 USA
202-994-5253 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet)
"We just changed our CONFIG.SYS, then pressed CTRL-ALT-DEL. It was easy."
-- Alexandre Giglavyi, director Lyceum of Information Technologies, Moscow.
------------------------------------------------------------------------

             reply	other threads:[~1993-08-13  3:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-13  3:27 Michael Feldman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-16 12:22 Exceptions in Declarative Region Wes Groleau x1240 C73-8
1993-08-13  4:16 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!sdd.hp.c
1993-08-13  3:49 Michael Feldman
1993-08-13  3:23 Michael Feldman
1993-08-13  2:49 Dave Bashford
1993-08-12 23:02 Mark A Biggar
1993-08-12 22:58 Mark A Biggar
1993-08-12 22:34 Dave Bashford
1993-08-12 18:53 agate!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!col.hp.com!csn
replies disabled

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