当在程序中插一条时,如果我不遍历,就直接插,如果有相同的记录,程序肯定会抛异常,我怎么做让程序把异常抛出去之后,继续执行下面的代码呢?import java.sql.Connection;
import java.sql.Statement;
import java.sql.SQLException;
import java.sql.ResultSet;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import java.sql.PreparedStatement;
import javax.naming.NamingException;
import java.sql.DriverManager;public class DBTest {
  public void insertDB()throws Exception{
    try{
        Connection con = null;
        ResultSet rs = null;
        PreparedStatement pstm = null;
        String user = "root";
        String password = "";
        Class.forName("org.gjt.mm.mysql.Driver").newInstance();
        con = DriverManager.getConnection(
            "jdbc:mysql://localhost:3306/mwzx");
        //for(int i =101 ;i<100000;i++){
        PreparedStatement ps = con.prepareStatement(
            "insert into zxl values(?,?)");
        ps.setInt(1, 137919);
        ps.setInt(2, 13799);
        int a = ps.executeUpdate();
      //}
      }
      catch (Exception cne) {
        System.out.println("Insert into the same value");
        System.out.println(cne.getMessage());
        cne.printStackTrace();
        throw cne;
      } 
  }  public static void main(String[] args) throws Exception{
    DBTest db = new DBTest();
    db.insertDB() ;
  }
}