DS-2063 SWORD keep-package-on-fail doesn't work for RuntimeExceptions.

https://jira.duraspace.org/browse/DS-2063
This commit is contained in:
Àlex Magaz Graça
2014-06-18 14:30:27 +02:00
parent 364dfd8704
commit 01e8719365

View File

@@ -163,6 +163,21 @@ public class DepositManager
throw e;
}
catch(SWORDErrorException e)
{
if (swordService.getSwordConfig().isKeepPackageOnFailedIngest())
{
try
{
storePackageAsFile(deposit);
}
catch(IOException e2)
{
log.warn("Unable to store SWORD package as file: " + e);
}
}
throw e;
}
catch(RuntimeException e)
{
if (swordService.getSwordConfig().isKeepPackageOnFailedIngest())
{