Had a quick conceptual question for the group:

If I had a nested PL/SQL block, I am not sure what will happen with the
exception handling. The example code is:

declare
   ... program declarations here ...
begin
   ...some code here...

   if (condition) then
   -- inner pl/sql block begins here
   begin
      ... do something here ...
   -- inner exception block
   exception
      when others then
      ... exception handling ...
   end;
   end if;
   ... some more code here ...

exception
   when others then
   ... exception handling ...
end;


The reason for the nested begin-end block is because I wanted to encapsulate
the block of code that corresponds to when (condition) is TRUE. What I am
not sure of is the effect of my decision to do so. If the inner block fails,
and executes the inner exception block, I am not sure what happens next:

(1) does the pl/sql block continue executing after the inner "end"
statement?
(2) does the pl/sql block continue automatically to the outer exception
clause?

I am in the process of testing my theories but thought I'd also check in
with the group to see if there is someone out there who has already
encountered this situation before.

Thanks!

Rich Pascual

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to