Which statement is true about the execution of the code?

View the Exhibit to examine the PL/SQL code.

Which statement is true about the execution of the code?

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



Leave a Reply 8

Your email address will not be published. Required fields are marked *


Tr

Tr

EDIT: D, it goes to WHEN OTHERS

SK

SK

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.