SQLExceptionWrapper
A wrapper class that adapts an OctaviusException into a standard java.sql.SQLException.
This wrapper is necessary for integration with standard JDBC components like connection pools (e.g., HikariCP) which rely on intercepting java.sql.SQLException to analyze connection state, evict dead connections, and properly interpret the SQLState.
It records no stack trace: the one that says where the failure happened is wrappedException's.
A SessionTerminatedException keeps the server's SQLSTATE here, and most of those codes - 25P04, 57P05 - are not ones a pool reads as a lost connection. So its wrapper chains a next exception in the class a pool does read, 08006, the way a driver reports the I/O failure that followed a FATAL: the first exception says why, the next that the connection is gone, and a pool evicts it at once rather than at its next validation.
Properties
The original OctaviusException that is being wrapped.