Permalink
Browse files

Fix #615 - introduced property export.shouldStopWhenFail for stopping

process when process failed
  • Loading branch information...
Stastny
Stastny committed Oct 19, 2018
1 parent 5bc3227 commit 38ec6b4c9c1162ffb1fc3aaf7be5bb873a6ccd12
Showing with 5 additions and 1 deletion.
  1. +5 −1 common/src/main/java/cz/incad/kramerius/service/impl/ExportServiceImpl.java
@@ -134,7 +134,11 @@ public void exportTree(String pid) throws IOException {
try{
store(exportDirectory, p, fedoraAccess.getAPIM().export(p, "info:fedora/fedora-system:FOXML-1.1", "archive"));
}catch(Exception ex){
LOGGER.warning("Cannot export object "+p+", skipping: "+ex);
if (configuration.getConfiguration().getBoolean("export.shouldStopWhenFail", true)) {
throw ex;
} else {
LOGGER.warning("Cannot export object "+p+", skipping: "+ex);
}
}
}
}

0 comments on commit 38ec6b4

Please sign in to comment.