GeekInterview.com
Series: Subject: Topic:
Question: 22 of 284

Oracle exception block

In the exception part,what will happen if u dont give (when others) where will it show error compile time or run time
Asked by: nabiel_pathan | Member Since Feb-2011 | Asked on: Feb 13th, 2012

View all questions by nabiel_pathan

Showing Answers 1 - 3 of 3 Answers
Giriraj Gupta

Answered On : Feb 26th, 2012

Run time

  
Login to rate this answer.

Now, to clarify, I am taking the following statement; "in the exception part, what will happen if you don't give the (when others) statement" to mean an exception block with no other when statements as well, in that case, an error would show at compile time.

If there were other when statements in the exception the code would compile, if an exception occurred and the other could not handle the error, then the handling of the error would be be moved up the calling stack until it was either handled or the application terminated because of the un-handled run-time error.

  
Login to rate this answer.
NAND

Answered On : Feb 27th, 2012

It will give the error at run time if it is not able to find the type of exception thrown in the current PL/SQL block or the outer block.
It will not throw the compile time error.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.