diff --git a/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/objectmanager/ContainerAdapter.java b/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/objectmanager/ContainerAdapter.java index 6323d14624..d9e6e27659 100644 --- a/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/objectmanager/ContainerAdapter.java +++ b/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/objectmanager/ContainerAdapter.java @@ -304,7 +304,9 @@ public class ContainerAdapter extends AbstractAdapter } catch(ItemCountException e) { - throw new IOException("Could not obtain Collection item-count: ", e); + IOException ioe = new IOException("Could not obtain Collection item-count"); + ioe.initCause(e); + throw ioe; } } } @@ -338,7 +340,9 @@ public class ContainerAdapter extends AbstractAdapter } catch(ItemCountException e) { - throw new IOException("Could not obtain Community item-count: ", e); + IOException ioe = new IOException("Could not obtain Collection item-count"); + ioe.initCause(e); + throw ioe; } } }