diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java index 78d4e8e3..bc095691 100644 --- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java +++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java @@ -17,6 +17,7 @@ import ratpack.handling.Context; import ratpack.handling.Handler; import java.io.StringWriter; +import java.util.Comparator; import java.util.HashMap; import java.util.Map; @@ -67,7 +68,7 @@ public class NumassRootHandler implements Handler { StringBuilder b = new StringBuilder(); renderStorage(ctx, b, server.getRun().getStorage()); data.put("storageContent", b.toString()); - } catch (StorageException ex) { + } catch (Exception ex) { data.put("storageContent", ex.toString()); } } else { @@ -85,18 +86,23 @@ public class NumassRootHandler implements Handler { } } - private void renderStorage(Context ctx, StringBuilder b, Storage storage) throws StorageException { - b.append("
+ %s
%n", shelf.getName())); - renderStorage(ctx, b, shelf); + private void renderStorage(Context ctx, StringBuilder b, Storage storage){ + try { + b.append("+ %s
%n", shelf.getName())); + renderStorage(ctx, b, shelf); + }); + + b.append("