FIXME: this class relies on "multiple dispatch", which does not exist in Java
(doh!). The current workaround it to cast properly at each call site. The
definitive fix is to use instanceof.
DriverSQLException(String message, SerializableException cause) Creates a new DriverSQLException around a
SerializableException received from controller, itself converted from an
SQLException in most cases.
DriverSQLException(String message, SQLException cause) An SQLException should not be wrapped inside a DriverSQLException: this is
a symptom of mixing different layers.
Creates a new DriverSQLException around a
SerializableException received from controller, itself converted from an
SQLException in most cases. So we set SQLState and vendorCode.
Parameters: message - message Parameters: cause - exception from controller to wrap
Creates a new DriverSQLException around an exception of a
type not specifically handled elsewhere. Typically used for exceptions
internal to the driver.
Parameters: message - message Parameters: cause - generic exception to wrap
An SQLException should not be wrapped inside a DriverSQLException: this is
a symptom of mixing different layers.
Parameters: message - message Parameters: cause - cause throws: IllegalArgumentException - always
Overrides super method so we print the serializable stack trace of next
exceptions in the chain (if they use our serializable stack trace)
See Also:java.lang.Throwable.printStackTrace