mirror of https://github.com/apache/lucene.git
LUCENE-10017 Less verbose exception on IndexFormatTooOld (#200)
This commit is contained in:
parent
0c3c8ec09a
commit
c36495dce7
|
@ -490,6 +490,10 @@ public final class CodecUtil {
|
|||
|
||||
// now check the footer
|
||||
long checksum = checkFooter(in);
|
||||
if (!(priorException instanceof IndexFormatTooOldException)) {
|
||||
// If the index format is too old and no corruption, do not add checksums
|
||||
// matching message since this may tend to unnecessarily alarm people who
|
||||
// see "JVM bug" in their logs
|
||||
priorException.addSuppressed(
|
||||
new CorruptIndexException(
|
||||
"checksum passed ("
|
||||
|
@ -497,6 +501,7 @@ public final class CodecUtil {
|
|||
+ "). possibly transient resource issue, or a Lucene or JVM bug",
|
||||
in));
|
||||
}
|
||||
}
|
||||
} catch (CorruptIndexException corruptException) {
|
||||
corruptException.addSuppressed(priorException);
|
||||
throw corruptException;
|
||||
|
|
Loading…
Reference in New Issue