diff src/org/tmatesoft/hg/internal/DataAccessProvider.java @ 404:31a719b9f95e smartgit3

Provide more detailed information on erroneous file operation
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 05 Mar 2012 15:15:49 +0100
parents 3cfa4d908fc9
children bb278ccf9866
line wrap: on
line diff
--- 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));