From 457e383f1a416df12b2885331bfa0fbba2a8170c Mon Sep 17 00:00:00 2001 From: tomas Date: Wed, 8 Jan 2014 15:00:52 +0100 Subject: [PATCH] Improve error logging in yang-store-impl Resulting exception should contain getMessage information from each nested exception. Change-Id: Idcb124a6e15f2be952d6b64028924929011e7156 Signed-off-by: tomas --- .../config/yang/store/impl/ExtenderYangTracker.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/opendaylight/config/yang-store-impl/src/main/java/org/opendaylight/controller/config/yang/store/impl/ExtenderYangTracker.java b/opendaylight/config/yang-store-impl/src/main/java/org/opendaylight/controller/config/yang/store/impl/ExtenderYangTracker.java index 9356dd3752..0d704a8f6a 100644 --- a/opendaylight/config/yang-store-impl/src/main/java/org/opendaylight/controller/config/yang/store/impl/ExtenderYangTracker.java +++ b/opendaylight/config/yang-store-impl/src/main/java/org/opendaylight/controller/config/yang/store/impl/ExtenderYangTracker.java @@ -186,7 +186,15 @@ public class ExtenderYangTracker extends BundleTracker implements YangSt yangStoreSnapshot.countModuleMXBeanEntries(), multimap.values().size()); return yangStoreSnapshot; } catch (RuntimeException e) { - throw new YangStoreException("Unable to parse yang files from following URLs: " + multimap, e); + StringBuffer causeStr = new StringBuffer(); + Throwable cause = e; + while (cause != null) { + causeStr.append(e.getMessage()); + causeStr.append("\n"); + cause = e.getCause(); + } + throw new YangStoreException("Unable to parse yang files. \n" + causeStr.toString() + + "URLs: " + multimap, e); } } -- 2.36.6