Pages

Saturday, 30 November 2013

Explain the guidelines for Avoiding and Handling PL/SQL Errors and Exceptions.



Answer
Guidelines for Avoiding and Handling PL/SQL Errors and Exceptions

* Use both error checking and exception handling to ensure your program can handle all possibilities.
* Add exception handlers whenever there is any possibility of an error occurring.
* Add error-checking code whenever you can predict that an error might occur if your code gets bad input data.
* Make your programs robust enough to work even if the database is not in the state you expect.
* Handle named exceptions whenever possible, instead of using WHEN OTHERS in exception handlers.
* Test your code with different combinations of bad data to see what potential errors arise.
* Write out debugging information in your exception handlers.
* Carefully consider whether each exception handler should commit the transaction, roll it back, or let it continue.

No comments:

Post a Comment

Enter Your Question

Total Pageviews

Blog