Commit 1fe2b612 authored by Alina Habibulina's avatar Alina Habibulina

[FIX] более подробные логи

parent 9ec6cff3
......@@ -233,10 +233,18 @@ public class ImportBean {
Cell cell = iter.next();
CellValue cellValue = evaluator.evaluate(cell);
if(cellValue == null || cellValue.equals("")) continue;
//получили заголовок ячейки
String header = cell.getSheet().getRow(0).getCell(cell.getColumnIndex()).getRichStringCellValue().toString();
try {
//получили заголовок ячейки
if (header.equals(NO) || header.equals("")) {
continue;
}
if (header.equals(NO)) {
continue;
}
......@@ -318,6 +326,11 @@ public class ImportBean {
}
rowFF.add(valueFF);
} catch (Exception e){
LOGGER.error("Error in line :" + (row.getRowNum() + 1) + ". Something wrong with cell of type: " + cellValue.getCellType() +
", and value: \"" + cellValue.formatAsString() + "\". The header is: \"" + header + "\".");
LOGGER.error(e.getMessage());
}
}
if (rowFF != null && !rowFF.isEmpty()) {
......@@ -381,8 +394,12 @@ public class ImportBean {
ff.setElements(elements);
}
} else if(formField.get("dataSource") != null){
try {
JsonObject dataSource = formField.get("dataSource").getAsJsonObject();
ff.setElements(getDictionary(dataSource.get("dict").getAsString(), dataSource.get("key").getAsString(), dataSource.get("value").getAsString(), login, password));
} catch (Exception e){
LOGGER.error(e.getMessage());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment