From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 13 Aug 93 03:27:22 GMT From: seas.gwu.edu!mfeldman@uunet.uu.net (Michael Feldman) Subject: Re: Exceptions in Declarative Region Message-ID: <1993Aug13.032722.21357@seas.gwu.edu> List-Id: 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. ------------------------------------------------------------------------