Epwing: Handle one more exception while open dictionary

This commit is contained in:
Abs62 2016-06-30 17:40:20 +03:00
parent 0ab39a977c
commit e057f61524

View file

@ -964,8 +964,17 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
string mainDirectory = i->substr( 0, ndir ); string mainDirectory = i->substr( 0, ndir );
Epwing::Book::EpwingBook dict; Epwing::Book::EpwingBook dict;
int subBooksNumber = 0;
int subBooksNumber = dict.setBook( mainDirectory ); try
{
subBooksNumber = dict.setBook( mainDirectory );
}
catch( std::exception & e )
{
gdWarning( "Epwing dictionary initializing failed: %s, error: %s\n",
mainDirectory.c_str(), e.what() );
continue;
}
for( int sb = 0; sb < subBooksNumber; sb++ ) for( int sb = 0; sb < subBooksNumber; sb++ )
{ {