Some more unhandled exceptions in index search

This commit is contained in:
Abs62 2013-09-18 17:58:38 +04:00
parent 8607af8d90
commit 7d167aedf8

View file

@ -80,6 +80,8 @@ vector< WordArticleLink > BtreeIndex::findArticles( wstring const & str )
{
vector< WordArticleLink > result;
try
{
wstring folded = Folding::apply( str );
if( folded.empty() )
folded = Folding::applyWhitespaceOnly( str );
@ -101,6 +103,17 @@ vector< WordArticleLink > BtreeIndex::findArticles( wstring const & str )
antialias( str, result );
}
}
catch( std::exception & e )
{
FDPRINTF( stderr, "Articles searching failed, error: %s\n", e.what() );
result.clear();
}
catch(...)
{
FDPRINTF( stderr, "Articles searching failed\n" );
result.clear();
}
return result;
}