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: 12 Aug 93 22:58:10 GMT From: dst17!mab@ford-wdl1.arpa (Mark A Biggar) Subject: Re: Exceptions in Declarative Region Message-ID: <1993Aug12.225810.15902@wdl.loral.com> List-Id: In article <1993Aug12.185359.6400@iplmail.orl.mmc.com> rgilbert@orl.mmc.com wri tes: >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? Because, in general, there is not much that you can do in the procedure's handler that's useful, except re-raise the exception. Yes, you can contrive cases where it might be useful, but they almost never occure in real programs. Besides, no visible effects on the outside world can have happened yet. OUT and IN-OUT parameters and global variables have yet to be touched (except in the pathological case of a function called as an initializer that modifies global variables, which is pretty poor programming practice anyway and should be discouraged strongly.) Also, any exception raised in the declarative part prevents any tasks declared or created in the declarative part from even starting (remember tasks are started up just before the first statement and after the whole declarative part is done), so no task clean up is needed either. -- Mark Biggar mab@wdl.loral.com