From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,87b35cce6984b960,start X-Google-Attributes: gid103376,public From: Dale Stanbrough Subject: Renaming exceptions in private section? Date: 1996/04/18 Message-ID: <4l52fh$ivr@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 148154638 distribution: world content-type: text/plain; charset=ISO-8859-1 x-xxmessage-id: organization: Royal Melbourne Institute of Technology mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-04-18T00:00:00+00:00 List-Id: Looking through some data structure packages I noted that many package specs required the use of an instantiated generic, and would rename some of it's exceptions. e.g. with some_generic_package; package a is package b is new some_generic_package(some_type); overflow :exception renames b.overflow; .... In the case where no other resources from the generic are being used by clients of package a, it would be better if the generic were instantiated in the private section, and the exception renamed there. However this doesn't seemed to be allowed. When I tried... package fred is a: exception; private b: exception; a: exception renames b; end; ...Gnat complained that "a" conflicts with declaration at line 3 Is it possible to rename an exception in the private section - sort of a deferred exception (similar to deferred constants)? Dale