Explain the guidelines for Avoiding and Handling PL/SQL Errors and Exceptions.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
Oracle Exceptions - Define Exceptions in PL/SQL, Explain how to define and raise exceptions in PL/SQL, What is Pragma Init Exception in oracle?, How exceptions are raised in oracle?.......