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,12 +490,17 @@ public final class CodecUtil {
|
||||||
|
|
||||||
// now check the footer
|
// now check the footer
|
||||||
long checksum = checkFooter(in);
|
long checksum = checkFooter(in);
|
||||||
priorException.addSuppressed(
|
if (!(priorException instanceof IndexFormatTooOldException)) {
|
||||||
new CorruptIndexException(
|
// If the index format is too old and no corruption, do not add checksums
|
||||||
"checksum passed ("
|
// matching message since this may tend to unnecessarily alarm people who
|
||||||
+ Long.toHexString(checksum)
|
// see "JVM bug" in their logs
|
||||||
+ "). possibly transient resource issue, or a Lucene or JVM bug",
|
priorException.addSuppressed(
|
||||||
in));
|
new CorruptIndexException(
|
||||||
|
"checksum passed ("
|
||||||
|
+ Long.toHexString(checksum)
|
||||||
|
+ "). possibly transient resource issue, or a Lucene or JVM bug",
|
||||||
|
in));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (CorruptIndexException corruptException) {
|
} catch (CorruptIndexException corruptException) {
|
||||||
corruptException.addSuppressed(priorException);
|
corruptException.addSuppressed(priorException);
|
||||||
|
|
Loading…
Reference in New Issue