I think that the questions should be just only code based and should not haven anything that can be left to interpretation. For example, in yesterday's question (05-AUG-2010) I knew the correct answer, yet, I got two options wrong. Why? Because it was written in natural language instead of being just code based interpretation. In my point of view, the answers had one crucial difference, that could have confused the players (it confused me... :( ). When the VALUE_ERROR is raised on the block declaration, it could never be handled on the block level. Yet, the other two options are raised block level and, if left unhandled by the programmer, they are propagated to the outer block and so on. So they were all raised to the outer block, bu it is my belief that internally, the exception is always handled block level except when it is in the declaration... You may be thinking that the exception is certainly not handled inside the block, but I think that things are not so black and white in this subject. See this example:
DECLARE l NUMBER; BEGIN RAISE VALUE_ERROR; EXCEPTION WHEN NO_DATA_FOUND THEN ROLLBACK; WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Mayday, mayday, I don''t know what to do...'); RAISE; END;
Was the exception VALUE_ERROR handled or not? Certainly it was caught... But then it was re-raised (or propagated??) tho the outer block... And nothing relevant was done... Probably I wouldn't remember this if there wasn't one option that was clearly different from the others in a feature relevant to the answer... If I didn't know that I couldn't handle an exception raised in the block declaration on that block, I would most probably have a higger score. If all the options were written in PL/SQL and the question was "Which of the options have the following output?" it would be easier to prove each one's knowledge in PL/SQL...
Here is my response:
I agree about offering lots of code-based quizzes, and that is certainly what you have seen in the PL/SQL Challenge. Having said that, I do think there is significant value in also tackling quizzes that ask you to understand concepts and rules in PL/SQL, and that pretty well means doing it in English, for the most part.
Regarding this player's specific objection, I don't really "get it." The choice to which I think he is referring as a source of ambiguity says:
"The exception section has only one WHEN clause (handler), and it is for NO_DATA_FOUND."
so the scenario in the code above does not apply. Certainly, if you have a WHEN OTHERS, you can trap and handle the exception, at which point you could choose to re-raise it. That is not, however, a choice I offered to you.