HhDatum.insert(hhData.iterator(), halt);
Hiber.close();
}
if (shouldHalt()) {
errors.add(new MonadMessage("The import has been cancelled."));
} else {
source.appendChild(new MonadMessage(
"The file has been imported successfully.").toXml(doc));
}
} catch (HttpException e) {
String message = e.getMessage();
if (message == null) {
message = HttpException.getStackTraceString(e);
}
errors.add(new MonadMessage(message));
// errors.add(new MonadMessage(
// "There are errors that need to be corrected before "
// + "the file can be imported."));
if (csvElement != null) {
source.appendChild(csvElement);
}
if (e instanceof InternalException) {
ChellowLogger.getLogger().log(Level.SEVERE,
"From header import process", e);
}
} catch (Throwable e) {
if (csvElement != null) {
source.appendChild(csvElement);
}
errors.add(new MonadMessage("Programmer Exception: "
+ HttpException.getStackTraceString(e)));
ChellowLogger.getLogger().log(Level.SEVERE,
"From header import process", e);
} finally {
source.setAttribute("line-number", String.valueOf(lineNumber));