# HG changeset patch # User Artem Tikhomirov # Date 1330956949 -3600 # Node ID 31a719b9f95e670477509a542b4dd652deadb695 # Parent fdc1db8f7f614704cf93169cb95d145b770c3511 Provide more detailed information on erroneous file operation diff -r fdc1db8f7f61 -r 31a719b9f95e src/org/tmatesoft/hg/internal/DataAccessProvider.java --- a/src/org/tmatesoft/hg/internal/DataAccessProvider.java Sat Feb 25 19:31:57 2012 +0100 +++ b/src/org/tmatesoft/hg/internal/DataAccessProvider.java Mon Mar 05 15:15:49 2012 +0100 @@ -237,7 +237,7 @@ @Override public void seek(int offset) throws IOException { if (offset > size) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException(String.format("Can't seek to %d for the file of size %d (buffer start:%d)", offset, size, bufferStartInFile)); } if (offset < bufferStartInFile + buffer.limit() && offset >= bufferStartInFile) { buffer.position((int) (offset - bufferStartInFile));