Integrate {Inference,Source}Exception with CommonStmtCtx
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / belongs_to / BelongsToStatementSupport.java
index 6a8ef1727c6fdf59aa438fef83e4140130954926..d8dc213b26aafd82818e03a352d71ef821c9e35c 100644 (file)
@@ -75,8 +75,8 @@ public final class BelongsToStatementSupport
             @Override
             public void prerequisiteFailed(final Collection<? extends Prerequisite<?>> failed) {
                 if (failed.contains(belongsToPrereq)) {
-                    throw new InferenceException(belongsToCtx.sourceReference(),
-                        "Module '%s' from belongs-to was not found", belongsToCtx.argument());
+                    throw new InferenceException(belongsToCtx, "Module '%s' from belongs-to was not found",
+                        belongsToCtx.argument());
                 }
             }
         });