Found it: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm
In summary: (1) if the inner pl/sql block fails, then it looks for an exception block to follow. If there is no exception block found, then it exits to the outer pl/sql block and tries to find a matching exception condition in the outer block. (2) if the inner pl/sql block fails, AND it finds a exception block and condition to match the error in the inner block, then it executes the exception instructions and exits out of the inner block... but continues to execute the code from the outer pl/sql block. (3) if you want the entire block of pl/sql code to exit out if the inner block fails, then use the RAISE command at the end of your exception handling. The RAISE command re-raises the pl/sql error against the outer exception block and skips the remaining code in the outer pl/sql block. If you are totally confused with the "inner" and "outer" references I have made, check out the link at the beginning of this post and look at the diagrams at the bottom of the page. They are very clear and explain the concepts well. ... good stuff ... i guess i answered my own question. hopefully the rest of the group finds this informative. Rich Pascual On Mon, Nov 29, 2010 at 11:27 AM, Richard Pascual <richg...@gmail.com>wrote: > 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