From 8caf09058da8dc8dbeff889c3e3218aef906e940 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 7 Aug 2015 22:14:38 +0200 Subject: [PATCH] more diagnostics for missing dom child (EA-71453 - assert: DomInvocationHandler.getCollectionChildren) --- .../com/intellij/util/xml/impl/DomInvocationHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xml/dom-impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java b/xml/dom-impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java index a0529b60a8fc..9e155cf78d43 100644 --- a/xml/dom-impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java +++ b/xml/dom-impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java @@ -875,8 +875,12 @@ public abstract class DomInvocationHandler key = description instanceof CustomDomChildrenDescription ? DomManagerImpl.DOM_CUSTOM_HANDLER_KEY : DomManagerImpl.DOM_COLLECTION_HANDLER_KEY; final DomInvocationHandler semElement = myManager.getSemService().getSemElement(key, subTag); if (semElement == null) { - myManager.getSemService().getSemElement(key, subTag); - throw new AssertionError("No child for subTag '" + subTag.getName() + "' in tag '" + tag.getName() +"' using key " + key); + String msg = "No child for subTag '" + subTag.getName() + "' in tag '" + tag.getName() + "' using key " + key + "; subtag count=" + subTags.size(); + DomInvocationHandler anyDom = myManager.getDomHandler(subTag); + if (anyDom != null) { + msg += "\n sub-dom=" + anyDom + " with " + anyDom.getChildDescription(); + } + throw new AssertionError(msg); } else { elements.add(semElement.getProxy());