comp.lang.ada
 help / color / mirror / Atom feed
* Renaming exceptions in private section?
@ 1996-04-18  0:00 Dale Stanbrough
  1996-04-22  0:00 ` Michel Gauthier
  0 siblings, 1 reply; 2+ messages in thread
From: Dale Stanbrough @ 1996-04-18  0:00 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-04-22  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-18  0:00 Renaming exceptions in private section? Dale Stanbrough
1996-04-22  0:00 ` Michel Gauthier

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