comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <dale@goanna.cs.rmit.EDU.AU>
Subject: Renaming exceptions in private section?
Date: 1996/04/18
Date: 1996-04-18T00:00:00+00:00	[thread overview]
Message-ID: <4l52fh$ivr@goanna.cs.rmit.edu.au> (raw)

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




             reply	other threads:[~1996-04-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-18  0:00 Dale Stanbrough [this message]
1996-04-22  0:00 ` Renaming exceptions in private section? Michel Gauthier
replies disabled

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