From 25ac0bbadd7764c5f51fdb14a747b1412ba8809e Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 24 Sep 2012 16:43:31 -0300 Subject: [PATCH] - Add additional debug info. RootTree seems to be out of sync. --- mindplot/src/main/javascript/IconGroup.js | 2 +- mindplot/src/main/javascript/StandaloneActionDispatcher.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mindplot/src/main/javascript/IconGroup.js b/mindplot/src/main/javascript/IconGroup.js index cb181a86..cdc38f22 100644 --- a/mindplot/src/main/javascript/IconGroup.js +++ b/mindplot/src/main/javascript/IconGroup.js @@ -80,7 +80,7 @@ mindplot.IconGroup = new Class({ }, this); if (result == null) { - throw new Error("Icon can no be found:" + iconModel); + throw new Error("Icon can no be found:" + iconModel.getId() + ", Icons:" + this._icons); } return result; diff --git a/mindplot/src/main/javascript/StandaloneActionDispatcher.js b/mindplot/src/main/javascript/StandaloneActionDispatcher.js index 05dd2136..6990ab87 100644 --- a/mindplot/src/main/javascript/StandaloneActionDispatcher.js +++ b/mindplot/src/main/javascript/StandaloneActionDispatcher.js @@ -246,7 +246,12 @@ mindplot.CommandContext = new Class({ return topicsIds.contains(topic.getId()); }); - $assert(result.length == topicsIds.length, "Could not find topic. Result:" + result + ", Filtered:" + topicsIds + ", Current Topics: " + designerTopics); + if (result.length != topicsIds.length) { + var ids = designerTopics.map(function (topic) { + return topic.getId(); + }); + $assert(result.length == topicsIds.length, "Could not find topic. Result:" + result + ", Filter Criteria:" + topicsIds + ", Current Topics: " + ids); + } return result; },