View the Exhibit to examine the PL/SQL code.
Which statement is true about the execution of the code?
A.
The exception raised in the code is handled by the exception handler for the PAST_DUE
exception.
B.
It does not execute because you cannot declare an exception with a similar name in the
subblock.
C.
The PAST_DUE exception raised in the subblock causes the program to terminate abruptly
because there is no exception handler in the subblock.
D.
The PAST_DUE exception raised by theenclosing block is not propagated to the outer block
and it is handled by the WHEN OTHERS exception handler
C
http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/errors.htm
Example 10-3 Scope of PL/SQL Exceptions
EDIT: D, it goes to WHEN OTHERS
D
it example is from documentation:
http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/errors.htm#i3329
d
D for sure
D
D
SQL> declare
2 past_due exception;
3 acct_num number;
4 begin
5 declare
6 past_due exception;
7 acct_num NUMBER;
8 due_date date:=sysdate-1;
9 todays_date date :=sysdate;
10 Begin
11 if due_date< todays_date then
12 raise past_due;
13 end if;
14 end;
15 EXCEPTION
16 when past_due then
17 dbms_output.put_line('handling Past due exception');
18 when others then
19 dbms_output.put_line('Non Recognized');
20 end;
21 /
Non Recognized
PL/SQL procedure successfully completed.