comp.lang.ada
 help / color / mirror / Atom feed
* Exception scope and handling
@ 2000-11-13  0:00 Sandro Binetti
  2000-11-13  0:00 ` John English
  2000-11-13  0:00 ` des walker
  0 siblings, 2 replies; 4+ messages in thread
From: Sandro Binetti @ 2000-11-13  0:00 UTC (permalink / raw)


 There's something that's not clear, or, better, I can't understand
about exception scope and handling.

Suppose to declarate an exception inside the declarative region of a
procedure, and handle it at the end of the body of the procedure.
What's the meaning of re-raising this exception outside this body?

Take a simple example:

procedure PROC1 is

  procedure PROC2 is
    FOO:EXCEPTION;
  begin
    ....
    ....
  EXCEPTION
    when FOO => handle_it;
                raise; -- ???? what's the meaning of this
  end proc2;

begin
  ...
  ...
  ...
  -- what kind of object is FOO here?
EXCEPTION
  when others => -- ???? why coul'd I handle FOO here, even if I don't
                 -- know anything about it?
end proc1;

--
Ciao, Sandro


Sent via Deja.com http://www.deja.com/
Before you buy.




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

end of thread, other threads:[~2000-11-13  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-13  0:00 Exception scope and handling Sandro Binetti
2000-11-13  0:00 ` John English
2000-11-13  0:00   ` Robert Dewar
2000-11-13  0:00 ` des walker

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