Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An exception will be raised in the DECLARATION section of the block BL_20. To wh

ID: 3866794 • Letter: A

Question

An exception will be raised in the DECLARATION section of the block BL_20. To which of the following section will the exception propagate?

     <<BL_10>>

     DECLARE

           v_4 NUMBER;

           v_5 NUMBER;

     BEGIN

           v_4 := 10;

           v_5 := v_4 + 80;

           <<BL_20>>

           DECLARE

                v_3 NUMBER := 90;

                v_4 NUMBER := v_3 / (v_3 - v_5);

-- Run-time error, propagate to?

           BEGIN

                v_3 := v_3 * v_4 + 1;

                v_4 := v_3 + v_4;

           EXCEPTION

                WHEN OTHERS THEN

                     DBMS_OUTPUT.PUT_LINE('ERROR (BL_20)!');

           END BL_20;

           v_4 := v_4 * v_4;

           <<BL_30>>

           DECLARE

                v_2 NUMBER := 0;

                v_5 NUMBER := v_4;             

           BEGIN

                ......

           EXCEPTION

                WHEN OTHERS THEN

                     DBMS_OUTPUT.PUT_LINE('ERROR (BL_30)!');

           END BL_30;

           <<BL_40>>

           DECLARE

                v_1 NUMBER := 3;

           BEGIN

                ......

           EXCEPTION

                WHEN OTHERS THEN

                     DBMS_OUTPUT.PUT_LINE('ERROR (BL_40)!');

           END BL_40;

           ......    

     EXCEPTION

           WHEN OTHERS THEN

                DBMS_OUTPUT.PUT_LINE('ERROR (BL_10)!');

     END BL_10;

A1.       The BL_10 block’s DECLARATION section

A2.       The BL_10 block’s EXECUTION section

A3.      The BL_10 block’s EXCEPTION section

B1.       The BL_20 block’s DECLARATION section

B2.       The BL_20 block’s EXECUTION section

B3.       The BL_20 block’s EXCEPTION section

C1.       The BL_30 block’s DECLARATION section

C2.       The BL_30 block’s EXECUTION section

C3.       The BL_30 block’s EXCEPTION section

D1.       The BL_40 block’s DECLARATION section

D2.       The BL_40 block’s EXECUTION section

D3.       The BL_40 block’s EXCEPTION section

E.         None of the above

Explanation / Answer

Answer is . B1 . the BL_20 BLOCKS DECLARATION SECTION.

-> BECAUSE others is not a predefined exception.so it should be declared in declare section and should

be raised when exception occurs.

-> also BL_20 declaration has v4 = v3 /(v3-v5) .

Here may be zero_error can be propagated it should be handled by predefined exception zero_divide .

)-> also here other exception is generated in many blocks but not raised.since others is not predefined exception , it should be declared in the declare section and should be handled in declare or executing section depends upon exception where occurs.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote