mirror of https://github.com/apache/lucene.git
give MDW verbosity when it throws deterministic exception
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1625540 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1c6749d907
commit
53f5c90d36
|
@ -41,6 +41,7 @@ import org.apache.lucene.index.IndexWriter;
|
|||
import org.apache.lucene.index.IndexWriterConfig;
|
||||
import org.apache.lucene.index.NoDeletionPolicy;
|
||||
import org.apache.lucene.index.SegmentInfos;
|
||||
import org.apache.lucene.util.IOUtils;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
import org.apache.lucene.util.ThrottledIndexOutput;
|
||||
|
@ -952,7 +953,15 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper {
|
|||
synchronized void maybeThrowDeterministicException() throws IOException {
|
||||
if (failures != null) {
|
||||
for(int i = 0; i < failures.size(); i++) {
|
||||
failures.get(i).eval(this);
|
||||
try {
|
||||
failures.get(i).eval(this);
|
||||
} catch (Throwable t) {
|
||||
if (LuceneTestCase.VERBOSE) {
|
||||
System.out.println("MockDirectoryWrapper: throw exc");
|
||||
t.printStackTrace(System.out);
|
||||
}
|
||||
IOUtils.reThrow(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue