[ONOS-4063 to 68] Intra YANG file Linking Implementation and Intra YANG file Linking Framework
Change-Id: I06e602c351ab54178bf90b8676af71a70e42371f
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
index 8683928..50e2c34 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
@@ -21,6 +21,8 @@
public class DataModelException extends Exception {
private static final long serialVersionUID = 201601270658L;
+ private int lineNumber;
+ private int charPositionInLine;
/**
* Constructor to create a data model exception with message.
@@ -49,4 +51,40 @@
public DataModelException(final Throwable cause) {
super(cause);
}
+
+ /**
+ * Returns line number of the exception.
+ *
+ * @return line number of the exception
+ */
+ public int getLineNumber() {
+ return this.lineNumber;
+ }
+
+ /**
+ * Returns position of the exception.
+ *
+ * @return position of the exception
+ */
+ public int getCharPositionInLine() {
+ return this.charPositionInLine;
+ }
+
+ /**
+ * Sets line number of YANG file.
+ *
+ * @param line line number of YANG file
+ */
+ public void setLine(int line) {
+ this.lineNumber = line;
+ }
+
+ /**
+ * Sets position of exception.
+ *
+ * @param charPosition position of exception
+ */
+ public void setCharPosition(int charPosition) {
+ this.charPositionInLine = charPosition;
+ }
}