Class WrappedSQLException

All Implemented Interfaces:
Serializable, Iterable<Throwable>

@Deprecated public class WrappedSQLException extends SQLException
Deprecated.
We have been increasingly using custom subtypes of SQLException to represent different conditions, such as when no row is returned. This allows the simple use of standard catch blocks to handle different conditions accordingly. However, wrapping the original exception defeats this, as it just become a generic SQLException, albeit with SQL STATE and such copied from the original exception.

The primary purpose of wrapping exceptions was to attach the SQL statement being processed at the time of failure. This statement is only used in error reporting, specifically via ErrorPrinter. We have created a new way to accomplish this, without altering or wrapping any exceptions: register an exception and corresponding SQL statement directly with ErrorPrinter, which will then automatically be included in error reports.

Wraps a SQLException to include its source SQL statement.
Author:
AO Industries, Inc.
See Also: