use of org.dbflute.exception.DfXlsDataRegistrationFailureException in project dbflute-core by dbflute.
the class DfXlsDataHandlerImpl method handleXlsDataRegistartionFailureException.
protected void handleXlsDataRegistartionFailureException(String dataDirectory, File file, String tableDbName, RuntimeException e) {
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Failed to register the xls data for ReplaceSchema.");
br.addItem("Advice");
br.addElement("Please confirm the exception message.");
br.addItem("Data Directory");
br.addElement(dataDirectory);
br.addItem("Xls File");
br.addElement(file);
br.addItem("Table");
br.addElement(tableDbName);
final String msg = br.buildExceptionMessage();
throw new DfXlsDataRegistrationFailureException(msg, e);
}
use of org.dbflute.exception.DfXlsDataRegistrationFailureException in project dbflute-core by dbflute.
the class DfXlsDataHandlerImpl method handleWriteTableException.
protected // basic
void handleWriteTableException(// basic
String dataDirectory, // basic
File file, // basic
DfDataTable dataTable, // an exception of main process
SQLException mainEx, // retry
SQLException retryEx, // retry
DfDataRow retryDataRow, List<String> columnNameList) {
// supplement
final DfJDBCException wrappedEx = DfJDBCException.voice(mainEx);
final String tableDbName = dataTable.getTableDbName();
final String msg = buildWriteFailureMessage(dataDirectory, file, tableDbName, wrappedEx, retryEx, retryDataRow, columnNameList);
throw new DfXlsDataRegistrationFailureException(msg, wrappedEx);
}
use of org.dbflute.exception.DfXlsDataRegistrationFailureException in project dbflute-core by dbflute.
the class DfXlsDataWritingExceptionThrower method handleWriteTableSQLException.
// -----------------------------------------------------
// Write SQLException
// ------------------
public // basic
void handleWriteTableSQLException(// basic
String dataDirectory, // basic
File file, // basic
DfDataTable dataTable, // an exception of main process
SQLException mainEx, // retry
SQLException retryEx, // retry
DfDataRow retryDataRow, // supplement
List<String> columnNameList, // cache map of bind type
Map<String, Map<String, Class<?>>> bindTypeCacheMap, // cache map of string processor
Map<String, Map<String, StringProcessor>> stringProcessorCacheMap) {
final DfJDBCException wrappedEx = DfJDBCException.voice(mainEx);
final String tableDbName = dataTable.getTableDbName();
final String msg = buildWriteFailureMessage(dataDirectory, file, tableDbName, wrappedEx, retryEx, retryDataRow, columnNameList, bindTypeCacheMap, stringProcessorCacheMap);
throw new DfXlsDataRegistrationFailureException(msg, wrappedEx);
}
use of org.dbflute.exception.DfXlsDataRegistrationFailureException in project dbflute-core by dbflute.
the class DfXlsDataWritingExceptionThrower method handleWriteTableFailureException.
// -----------------------------------------------------
// Write Failure
// -------------
public void handleWriteTableFailureException(String dataDirectory, File file, String tableDbName, RuntimeException e) {
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Failed to register the xls data for ReplaceSchema.");
br.addItem("Advice");
br.addElement("Please confirm the exception message.");
br.addItem("Data Directory");
br.addElement(dataDirectory);
br.addItem("Xls File");
br.addElement(file);
br.addItem("Table");
br.addElement(tableDbName);
final String msg = br.buildExceptionMessage();
throw new DfXlsDataRegistrationFailureException(msg, e);
}
Aggregations