Skip to content

Commit

Permalink
catch throwable for tests (assert fails) - not just exception
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x@1363341 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markrmiller committed Jul 19, 2012
1 parent 47510dc commit d504ef3
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ public synchronized void newIndexWriter(SolrCore core) throws IOException {
} catch (InterruptedException e) {}
}

if (indexWriter != null) {
try {
indexWriter.close();
} catch (Exception e) {
SolrException.log(log, "Error closing old IndexWriter", e);
}
}

try {
if (indexWriter != null) {
try {
indexWriter.close();
} catch (Throwable t) {
SolrException.log(log, "Error closing old IndexWriter", t);
}
}

indexWriter = createMainIndexWriter(core, "DirectUpdateHandler2", false,
true);
// we need to null this so it picks up the new writer next get call
Expand Down

0 comments on commit d504ef3

Please sign in to comment.