include YANG module QName in "Schema for %s is not available." error
[mdsal.git] / 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;
     }