Log.error(Geonet.CSW_SEARCH, " (C) StackTrace:\n" + Util.getStackTrace(e));
throw new NoApplicableCodeEx("Raised exception while searching metadata : " + e);
} finally {
try {
if (indexAndTaxonomy != null) {
sm.releaseIndexReader(indexAndTaxonomy);
}
} catch (Exception ex) {
// eat it as it probably doesn't matter,
// but say what happened anyway
Log.error(Geonet.CSW_SEARCH, "Error while releasing index searcher ", ex);