title: how to handle exceptions in the while loop?
body: <p>I have a situation in java where in:</p>
  
  <pre><code>while(resultset.next()){
     try{
        //some executable prepared statements written
     }
     catch(MySQLIntegrityConstraintViolationException ex){
        //block2
     }
     catch(SQLException ex){
        //block1
     }
  }
  </code></pre>
  
  <p>now here , what I am trying to do is that if an <code>MySQLIntegrityConstraintViolationException</code> is seen, I have to skip it and just continue with the next record...
  I am unable to find a mechanism to do this.
  Please could someone suggest what should be done so that the exception is ignored.</p>
  
  <p>Please let me know..Thank you very much in advance.</p>