mirror of https://github.com/apache/lucene.git
improve exception message
This commit is contained in:
parent
3c15c3f03d
commit
0404be94a7
|
@ -755,7 +755,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
*/
|
||||
public IndexWriter(Directory d, IndexWriterConfig conf) throws IOException {
|
||||
if (d instanceof FSDirectory && ((FSDirectory) d).checkPendingDeletions()) {
|
||||
throw new IllegalArgumentException("Directory " + d + " is still has pending deleted files; cannot initialize IndexWriter");
|
||||
throw new IllegalArgumentException("Directory " + d + " still has pending deleted files; cannot initialize IndexWriter");
|
||||
}
|
||||
|
||||
conf.setIndexWriter(this); // prevent reuse by other instances
|
||||
|
|
Loading…
Reference in New Issue