diff --git a/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java b/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java index 12d012f0f89..44fe5fac0e3 100644 --- a/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java +++ b/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java @@ -491,14 +491,14 @@ public class ConcurrentMergeScheduler extends MergeScheduler { @Override public String toString() { - MergePolicy.OneMerge merge = getRunningMerge(); - if (merge == null) { - merge = startMerge; - } try { + MergePolicy.OneMerge merge = getRunningMerge(); + if (merge == null) { + merge = startMerge; + } return "merge thread: " + tWriter.segString(merge.segments); - } catch (IOException ioe) { - throw new RuntimeException(ioe); + } catch (Throwable e) { + return "merge thread: " + e.toString(); } } }