improved the code catching error on deleting VRE folder ID, see #24902

This commit is contained in:
Francesco Mangiacrapa 2023-04-04 16:12:43 +02:00
parent cb9ae34034
commit a65c4a86da
1 changed files with 7 additions and 0 deletions

View File

@ -820,6 +820,13 @@ public class ProfiledMongoManager extends MongoManager implements MongoManagerI<
log.info("Deleting Fileset Folder ID {} ",fs.getFolderId());
new WorkspaceManager().deleteItem(fs.getFolderId());
}catch (Exception e) {
//Updated by Francesco. See #24902
LifecycleInformation info = doc.getLifecycleInformation();
if(info==null) {
info = new LifecycleInformation();
}
info.addErrorMessage("Unable to delete the Folder ID "+fs.getFolderId()+" in the VRE Folder");
info.setLastOperationStatus(LifecycleInformation.Status.WARNING);
log.warn("Error on deleting the Folder ID {} in the VRE Folder",fs.getFolderId(), e);
}
}