diff options
Diffstat (limited to 'libjava/javax/swing/text/BadLocationException.java')
-rw-r--r-- | libjava/javax/swing/text/BadLocationException.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/libjava/javax/swing/text/BadLocationException.java b/libjava/javax/swing/text/BadLocationException.java index 81e6cc8..d62ad54 100644 --- a/libjava/javax/swing/text/BadLocationException.java +++ b/libjava/javax/swing/text/BadLocationException.java @@ -40,7 +40,25 @@ package javax.swing.text; public class BadLocationException extends Exception { - BadLocationException() - { - } + int offset; + + /** + * Constructs a <code>BadLocationException</code> + * + * @param str A string indicating what was wrong with the arguments + * @param offset Offset within the document that was requested >= 0 + */ + public BadLocationException (String str, int offset) + { + super (str); + this.offset = offset; + } + + /** + * Returns the offset into the document that was not legal + */ + public int offsetRequested () + { + return offset; + } } |