40 |
|
|
41 |
public class BadLocationException extends Exception |
public class BadLocationException extends Exception |
42 |
{ |
{ |
43 |
BadLocationException() |
int offset; |
44 |
{ |
|
45 |
} |
/** |
46 |
|
* Constructs a <code>BadLocationException</code> |
47 |
|
* |
48 |
|
* @param str A string indicating what was wrong with the arguments |
49 |
|
* @param offset Offset within the document that was requested >= 0 |
50 |
|
*/ |
51 |
|
public BadLocationException (String str, int offset) |
52 |
|
{ |
53 |
|
super (str); |
54 |
|
this.offset = offset; |
55 |
|
} |
56 |
|
|
57 |
|
/** |
58 |
|
* Returns the offset into the document that was not legal |
59 |
|
*/ |
60 |
|
public int offsetRequested () |
61 |
|
{ |
62 |
|
return offset; |
63 |
|
} |
64 |
} |
} |