Add union deserialization debugs
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / yangtools / binding / data / codec / impl / UnionValueOptionContext.java
index b53cd7e4cd8dd07408a6efaae9533211e86055d7..52dd88e33d31d0f9b77c5ae5956847827509a6a9 100644 (file)
@@ -56,7 +56,7 @@ final class UnionValueOptionContext {
         try {
             value = codec.deserialize(input);
         } catch (Exception e) {
-            LOG.debug("Codec failed to deserialize input {}", input, e);
+            LOG.debug("Codec {} failed to deserialize input {}", codec, input, e);
             return null;
         }
 
@@ -64,7 +64,7 @@ final class UnionValueOptionContext {
             return unionCtor.invokeExact(value);
         } catch (ClassCastException e) {
             // This case can happen. e.g. NOOP_CODEC
-            LOG.debug("Codec failed to instantiate {} {}", codec, input);
+            LOG.debug("Failed to instantiate {} for input {} value {}", bindingType, input, value, e);
             return null;
         } catch (Throwable e) {
             throw new IllegalArgumentException("Failed to construct union for value " + value, e);