exam questions

Exam 1z0-144 All Questions

View all questions & answers for the 1z0-144 exam

Exam 1z0-144 topic 1 question 70 discussion

Actual exam question from Oracle's 1z0-144
Question #: 70
Topic #: 1
[All 1z0-144 Questions]

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 the enclosing block is not propagated to the outer block and it is handled by the WHEN OTHERS exception handler
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
trex_fcs
1 year, 10 months ago
Selected Answer: D
/* Formatted on 03/04/2023 09:41:12 (QP5 v5.381) */ DECLARE past_due EXCEPTION; acct_num NUMBER; BEGIN DECLARE past_due EXCEPTION; acct_num NUMBER; due_date DATE := SYSDATE - 1; todays_date DATE := SYSDATE; BEGIN IF due_date < todays_date THEN RAISE past_due; END IF; END; EXCEPTION WHEN past_due THEN DBMS_OUTPUT.PUT_LINE ('Handling PAST_DUE exception'); WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('Could not recognize exception '||sqlerrm); END;
upvoted 1 times
...
Farmaceits
3 years, 5 months ago
Correct answer is D, but formulation should say: "The PAST_DUE exception raised by the enclosing block is propagated to the outer block and it is handled by the WHEN OTHERS exception handler" The unhandled exception IS propagated to the outer block when local exception handler for the raised exception is not found.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago