Michael: Thanks for the tip. I like the practice of naming nested pl/sql blocks as it eases readability... <<response>>a most definitely useful approach; end response;
Gopa: You may not have seen my follow up post to my original question but it seems that your findings or understanding of this "bubble effect" confirms what I discovered in the Oracle documentation. Thanks for your reply. Rich Pascual On Mon, Nov 29, 2010 at 7:38 PM, Gopakumar Pandarikkal < pandarik...@gmail.com> wrote: > As the exception is definitely handled by the "when others" execution will > continue after the end of inner block end. In situations when the inner > exception handler cannot handle the exception, the exception directly goes > to the outer block exception handler,there also it is not matching with any > exception handling condition,it is escalated further. If nothing is handli.g > the exception it goes the front end tool which called the procedure(may be > java application) This is what they call propagation of exception or the > bubble effect. > I have not practically verified it. > > regards > Gopa > > On Nov 30, 2010 12:57 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 > > -- > 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 > -- 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