public static void printWarnings(Connection conn,PrintWriter pw){
  if (conn != null) {
    try {
      printStackTrace(conn.getWarnings(),pw);
    }
 catch (    SQLException e) {
      printStackTrace(e,pw);
    }
  }
}

public static void printWarnings ( Connection conn , PrintWriter pw ) { if ( conn != null ) { try { printStackTrace ( conn . getWarnings ( ) , pw ) ; } catch ( SQLException e ) { printStackTrace ( e , pw ) ; } } }
print warnings on a connection to a specified printwriter .
