Description should include the following:
- Exception handling allows for handling of predefined errors with predefined solutions.
- When an exception occurs, the exception is thrown. The program execution will stop, and the error/exception will pass to the nearest catch clause. If no catch clause is included, the program stops entirely.
- The most common exception in JDBC is java.sql.SQL; however,
- a SQLException can occur in both the driver and the database
- when an exception occurs, the SQLException object is passed to the catch clause
- the SQLException object has several methods to get the error code, get the message, and print the error.