mirror of https://github.com/apache/lucene.git
add more detail to exception message
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1697364 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1dc2fb6a6
commit
ebaff1c4dc
|
@ -44,9 +44,10 @@ public abstract class ChecksumIndexInput extends IndexInput {
|
|||
*/
|
||||
@Override
|
||||
public void seek(long pos) throws IOException {
|
||||
final long skip = pos - getFilePointer();
|
||||
final long curFP = getFilePointer();
|
||||
final long skip = pos - curFP;
|
||||
if (skip < 0) {
|
||||
throw new IllegalStateException(getClass() + " cannot seek backwards");
|
||||
throw new IllegalStateException(getClass() + " cannot seek backwards (pos=" + pos + " getFilePointer()=" + curFP + ")");
|
||||
}
|
||||
skipBytes(skip);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue