Integrate {Inference,Source}Exception with CommonStmtCtx
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / type / TypeStatementRFC7950Support.java
index 5f78473409beba91acc998cb7b9343dff70449fb..5374e93a683d3d91e6f8241b2dc5b432f9766ed0 100644 (file)
@@ -89,7 +89,7 @@ public final class TypeStatementRFC7950Support extends AbstractTypeStatementSupp
             }
         }
 
-        throw new SourceException(stmt.sourceReference(), "Bit '%s' is not a subset of its base bits type %s.", bitName,
+        throw new SourceException(stmt, "Bit '%s' is not a subset of its base bits type %s.", bitName,
             baseType.getQName());
     }
 
@@ -102,8 +102,8 @@ public final class TypeStatementRFC7950Support extends AbstractTypeStatementSupp
             }
         }
 
-        throw new SourceException(ctx.sourceReference(), "Enum '%s' is not a subset of its base enumeration type %s.",
-            enumName, baseType.getQName());
+        throw new SourceException(ctx, "Enum '%s' is not a subset of its base enumeration type %s.", enumName,
+            baseType.getQName());
     }
 
 }