From 6f19323292ba2b8abd2e23e43c9dbaefa6dba6e9 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 28 Mar 2022 08:15:46 -0300 Subject: [PATCH] Add debug information. --- .../java/com/wisemapping/rest/MindmapController.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 1a02e06b..c64c3b9e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -454,9 +454,15 @@ public class MindmapController extends BaseController { public void batchDelete(@RequestParam() String ids) throws IOException, WiseMappingException { final User user = Utils.getUser(); final String[] mapsIds = ids.split(","); - for (final String mapId : mapsIds) { - final Mindmap mindmap = findMindmapById(Integer.parseInt(mapId)); - mindmapService.removeMindmap(mindmap, user); + try { + for (final String mapId : mapsIds) { + final Mindmap mindmap = findMindmapById(Integer.parseInt(mapId)); + mindmapService.removeMindmap(mindmap, user); + } + } catch (Exception e) { + final AccessDeniedSecurityException accessDenied = new AccessDeniedSecurityException("Map could not be deleted. Maps to be deleted:" + ids); + accessDenied.initCause(e); + throw accessDenied; } }