diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-22 12:02:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-23 10:31:21 +0000 |
commit | b06d05fbdace491977b7a1cf8090b13ce37393c9 (patch) | |
tree | c567ddb38b7f10b3f3d8422f0654a9fcd0b1b64e /xmlhelp | |
parent | 97fc40055d33f4e56a634995446eece45caaa2f3 (diff) |
reduce try-catch CLuceneError block
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx index 1241fb659266..9ccd6f4d7290 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx @@ -161,7 +161,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF } pQueryResultVector->reserve( hitCount ); - // START Invoke CLucene HelpSearch rtl::OUString aLang = m_aURLParameter.get_language(); const std::vector< rtl::OUString >& aListItem = queryList[i]; ::rtl::OUString aNewQueryStr = aListItem[0]; @@ -169,8 +168,15 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF vector<float> aScoreVector; vector<rtl::OUString> aPathVector; - HelpSearch searcher(aLang, idxDir); - searcher.query(aNewQueryStr, bCaptionsOnly, aPathVector, aScoreVector); + try + { + HelpSearch searcher(aLang, idxDir); + searcher.query(aNewQueryStr, bCaptionsOnly, aPathVector, aScoreVector); + } + catch (CLuceneError &e) + { + SAL_WARN("xmlhelp", "CLuceneError: " << e.what()); + } if( nQueryListSize > 1 ) aSet.clear(); @@ -180,7 +186,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF if (nQueryListSize > 1) aSet.insert(aPathVector[j]); } - // END Invoke CLucene HelpSearch // intersect if( nQueryListSize > 1 ) @@ -253,10 +258,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF { SAL_WARN("xmlhelp", "Exception: " << e.Message); } - catch (CLuceneError &e) - { - SAL_WARN("xmlhelp", "CLuceneError: " << e.what()); - } ++iDir; |