1 21 22 package org.apache.derby.client.am; 23 24 import org.apache.derby.iapi.services.info.JVMInfo; 25 import org.apache.derby.shared.common.i18n.MessageUtil; 26 import org.apache.derby.shared.common.error.ExceptionUtil; 27 28 public class BatchUpdateException extends java.sql.BatchUpdateException { 29 30 36 private static MessageUtil msgutil_ = 37 SqlException.getMessageUtil(); 38 39 public BatchUpdateException(LogWriter logWriter, ClientMessageId msgid, 40 Object [] args, int[] updateCounts) 41 { 42 super( 43 msgutil_.getCompleteMessage( 44 msgid.msgid, 45 args), 46 ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid), 47 ExceptionUtil.getSeverityFromIdentifier(msgid.msgid), 48 updateCounts); 49 50 if (logWriter != null) { 51 logWriter.traceDiagnosable(this); 52 } 53 } 54 55 public BatchUpdateException(LogWriter logWriter, ClientMessageId msgid, 58 int[] updateCounts) 59 { 60 this(logWriter, msgid, (Object [])null, updateCounts); 61 } 62 63 public BatchUpdateException(LogWriter logWriter, ClientMessageId msgid, 64 Object arg1, int[] updateCounts) 65 { 66 this(logWriter, msgid, new Object [] {arg1}, updateCounts); 67 } 68 69 72 public BatchUpdateException(LogWriter logWriter) { 74 this(logWriter, null, null, SqlException.DEFAULT_ERRCODE, null); 75 } 76 77 public BatchUpdateException(LogWriter logWriter, int[] updateCounts) { 79 this(logWriter, null, null, SqlException.DEFAULT_ERRCODE, updateCounts); 80 } 81 82 public BatchUpdateException(LogWriter logWriter, String reason, int[] updateCounts) { 84 this(logWriter, reason, null, SqlException.DEFAULT_ERRCODE, updateCounts); 85 } 86 87 public BatchUpdateException(LogWriter logWriter, String reason, String sqlState, int[] updateCounts) { 89 this(logWriter, reason, sqlState, SqlException.DEFAULT_ERRCODE, updateCounts); 90 } 91 92 public BatchUpdateException(LogWriter logWriter, String reason, String sqlState, int errorCode, int[] updateCounts) { 94 super(reason, sqlState, errorCode, updateCounts); 95 if (logWriter != null) { 96 logWriter.traceDiagnosable(this); 97 } 98 } 99 } 100 101 | Popular Tags |