Java SQLException printSQLExceptionToErrorLog(Log logger, String message, List sqlExceptions)

Here you can find the source of printSQLExceptionToErrorLog(Log logger, String message, List sqlExceptions)

Description

print SQL Exception To Error Log

License

Apache License

Declaration

public static void printSQLExceptionToErrorLog(Log logger,
        String message, List<SQLException> sqlExceptions) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.SQLException;

import java.util.List;

import org.apache.commons.logging.Log;

public class Main {

    public static void printSQLExceptionToErrorLog(Log logger,
            String message, List<SQLException> sqlExceptions) {
        if (sqlExceptions != null && !sqlExceptions.isEmpty()) {
            for (SQLException sqlException : sqlExceptions) {
                logger.error(message, sqlException);
            }//from  w  w w .  jav  a2  s  .  co m
            sqlExceptions.clear();
        }
    }
}

Related

  1. printSQLException(SQLException e)
  2. printSQLException(SQLException e)
  3. printSQLException(SQLException ex)
  4. printSQLException(SQLException ex)
  5. printSqlException(SQLException sqlex)
  6. printStackTrace(final Throwable exception)
  7. printStackTrace(SQLException e)
  8. retrieveDetailException(Throwable throwable)
  9. rollbackTransaction(final Connection conn, final SQLException e)