class JDBCSSHRecordStoreConnection implements SSHRecordStoreConnection {

    RuntimeException sqlError(SQLException ex, String caller) {
        
        String sqlState = ex.getSQLState();
        int code = ResourceException.INTERNAL_SERVER_ERROR;
        String msg;
        if (ex instanceof SQLTimeoutException) {
            code = ResourceException.SERVICE_UNAVAILABLE;
            msg = "Statement cancelled due to timeout";
        } else {
            msg = ex.getMessage() + ", state: " + sqlState + ", code: " + ex.getErrorCode();
        }
        LOGGER.error("SQLError: {} - {}", caller, msg);
        return new ResourceException(code, msg);
    }

    public  JDBCSSHRecordStoreConnection(Connection con);

}