print out version infos in JavaBinCodec when throwing exception

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1065465 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2011-01-31 01:57:57 +00:00
parent 48ca1148e2
commit 1377b916e6
1 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,8 @@ public class JavaBinCodec {
FastInputStream dis = FastInputStream.wrap(is);
version = dis.readByte();
if (version != VERSION) {
throw new RuntimeException("Invalid version or the data in not in 'javabin' format");
throw new RuntimeException("Invalid version (expected " + VERSION +
", but " + version + ") or the data in not in 'javabin' format");
}
return readVal(dis);
}