JAL-580 ensure WUSS annotation is reparsed if necessary and cope with parse errors
[jalview.git] / src / jalview / analysis / WUSSParseException.java
diff --git a/src/jalview/analysis/WUSSParseException.java b/src/jalview/analysis/WUSSParseException.java
new file mode 100644 (file)
index 0000000..c8ade0c
--- /dev/null
@@ -0,0 +1,19 @@
+package jalview.analysis;
+
+public class WUSSParseException extends Exception {
+  private long problemPos;
+  public WUSSParseException(long problemPos)
+  {
+    this("Invalid WUSS Notation", problemPos);
+  }
+  public WUSSParseException(String message, long problemPos)
+  {
+    super(message+" at or near position "+problemPos);
+    this.problemPos=problemPos;
+  }
+  public long getProblemPos()
+  {
+    return problemPos;
+  }
+  
+}
\ No newline at end of file