/** * Include SQL in exception. */ private SQLException wrap(SQLException sqle, Statement stmnt) { if (sqle instanceof ReportingSQLException) return (ReportingSQLException) sqle; return new ReportingSQLException(sqle, stmnt); }
/** * Include SQL in exception. */ private SQLException wrap(SQLException sqle, String sql) { if (sqle instanceof ReportingSQLException) return (ReportingSQLException) sqle; return new ReportingSQLException(sqle, sql); }
/** * Include SQL in exception. */ private SQLException wrap(SQLException sqle, Statement stmnt, String sql, int indexOfFailedBatchObject) { ReportingSQLException toReturn = null; if (sqle instanceof ReportingSQLException) { toReturn = (ReportingSQLException) sqle; } else { toReturn = new ReportingSQLException(sqle, stmnt, sql); } toReturn.setIndexOfFirstFailedObject(indexOfFailedBatchObject); return toReturn; }
/** * Include SQL in exception. */ private SQLException wrap(SQLException sqle, Statement stmnt, String sql, int indexOfFailedBatchObject) { ReportingSQLException toReturn = null; if (sqle instanceof ReportingSQLException) { toReturn = (ReportingSQLException) sqle; } else { toReturn = new ReportingSQLException(sqle, stmnt, sql); } toReturn.setIndexOfFirstFailedObject(indexOfFailedBatchObject); return toReturn; }
/** * Include SQL in exception. */ private SQLException wrap(SQLException sqle, Statement stmnt, String sql, int indexOfFailedBatchObject) { ReportingSQLException toReturn = null; if (sqle instanceof ReportingSQLException) { toReturn = (ReportingSQLException) sqle; } else { toReturn = new ReportingSQLException(sqle, stmnt, sql); } toReturn.setIndexOfFirstFailedObject(indexOfFailedBatchObject); return toReturn; }