private static final long serialVersionUID = 1239548963471793178L;
- public YangParseException(String errorMsg) {
+ public YangParseException(final String errorMsg) {
super(errorMsg);
}
- public YangParseException(String errorMsg, Exception exception) {
+ public YangParseException(final String errorMsg, final Exception exception) {
super(errorMsg, exception);
}
+ public YangParseException(final int line, final String errorMsg) {
+ super("Error on line " + line + ": " + errorMsg);
+ }
+
+ public YangParseException(final int line, final String errorMsg,
+ final Exception exception) {
+ super("Error on line " + line + ": " + errorMsg, exception);
+ }
+
+ public YangParseException(final String moduleName, final int line,
+ final String errorMsg) {
+ super("Error in module '" + moduleName + "' on line " + line + ": "
+ + errorMsg);
+ }
+
+ public YangParseException(final String moduleName, final int line,
+ final String errorMsg, final Exception exception) {
+ super("Error in module '" + moduleName + "' on line " + line + ": "
+ + errorMsg, exception);
+ }
+
}