mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Some more unhandled exceptions in index search
This commit is contained in:
parent
8607af8d90
commit
7d167aedf8
13
btreeidx.cc
13
btreeidx.cc
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue