include YANG module QName in "Schema for %s is not available." error 52/73352/3
authorMichael Vorburger <vorburger@redhat.com>
Thu, 21 Jun 2018 14:22:15 +0000 (16:22 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 26 Jun 2018 10:49:40 +0000 (10:49 +0000)
This is a repeat of I305299ffb3a40036dd72b858ef955ffcf45f6775,
which for some reason (human error or Gerrit bug?!) went into empty.

JIRA: MDSAL-354
Change-Id: Ie7014f824738a7e99799e1637a516617664d63d8
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingToNormalizedNodeCodec.java

index 508453c13f2ddd9b184a7055c3c3a98c08c2ed51..9648fedf7318b7272a05939baa9bdd540b19cdae 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.mdsal.binding.dom.adapter;
 
+import static com.google.common.base.Preconditions.checkState;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.base.Function;
@@ -318,7 +319,8 @@ public class BindingToNormalizedNodeCodec implements BindingCodecTreeFactory,
             Preconditions.checkState(localRuntimeContext != null, "BindingRuntimeContext is not available.");
             module = localRuntimeContext.getSchemaContext().findModule(moduleName).orElse(null);
         }
-        Preconditions.checkState(module != null, "Schema for %s is not available.", modeledClass);
+        checkState(module != null, "Schema for %s is not available; expected module name: %s.", modeledClass,
+                moduleName);
         return module;
     }