From d504ef309a9285e81593f9708fc76e660b2fe758 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 19 Jul 2012 14:04:16 +0000 Subject: [PATCH] catch throwable for tests (assert fails) - not just exception git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x@1363341 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/solr/update/DefaultSolrCoreState.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java b/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java index 9debe5cdeda..c5b7bfde377 100644 --- a/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java +++ b/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java @@ -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