Ordering of Exceptions [message #313074] |
Thu, 10 April 2008 10:19  |
vamsikgummadi
Messages: 62 Registered: April 2006 Location: United States, MI
|
Member |
|
|
Hi Friends,
Is there any particular order for the exceptions to be used in a stored procedure or functions? I only know that 'WHEN OTHERS THEN' should be used at the end so as to handle the exceptions that we may have missed to handle. Then what about the ordering of exceptions like
No-data-found == when no rows are returned
Cursor-already-open == when a cursor is opened in advance
Dup-val-On-index == for duplicate entry of index..
Storage-error == if memory is damaged
Program-error == internal problem in pl/sql
Zero-divide == divide by zero
invalid-cursor == if a cursor is not open and you are
trying to close it
Login-denied == invalid user name or password
Invalid-number == if you are inserting a string datatype
for a number datatype which is
already declared
Too-many-rows == if more rows r returned by select
statement.Hope you have understood my question. Please get back if you need some other clarifications from my end. It would be very helpful if you can provide me with the sample snippets if possible.
Thanks,
Vamsi K Gummadi.
|
|
|
|
Re: Ordering of Exceptions [message #313115 is a reply to message #313075] |
Thu, 10 April 2008 15:06  |
vamsikgummadi
Messages: 62 Registered: April 2006 Location: United States, MI
|
Member |
|
|
Hi Cadot,
Thank you for the clarification. Actually this question was asked in an interview recently. Thanks once again for clarifying my doubt.
Regards,
Vamsi K Gummadi.
|
|
|