mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Catch any exceptions when opening the lucene FSDirectory.
This commit is contained in:
@@ -47,8 +47,17 @@ FuzzyIndex::FuzzyIndex( bool wipeIndex )
|
|||||||
QByteArray path = m_lucenePath.toUtf8();
|
QByteArray path = m_lucenePath.toUtf8();
|
||||||
const char* cPath = path.constData();
|
const char* cPath = path.constData();
|
||||||
|
|
||||||
m_luceneDir = FSDirectory::getDirectory( cPath );
|
tDebug() << "Opening Lucene directory:" << path;
|
||||||
m_analyzer = _CLNEW SimpleAnalyzer();
|
try
|
||||||
|
{
|
||||||
|
m_luceneDir = FSDirectory::getDirectory( cPath );
|
||||||
|
m_analyzer = _CLNEW SimpleAnalyzer();
|
||||||
|
}
|
||||||
|
catch ( CLuceneError& error )
|
||||||
|
{
|
||||||
|
tDebug() << "Caught CLucene error:" << error.what();
|
||||||
|
Q_ASSERT( false );
|
||||||
|
}
|
||||||
|
|
||||||
if ( wipeIndex )
|
if ( wipeIndex )
|
||||||
{
|
{
|
||||||
@@ -92,7 +101,7 @@ FuzzyIndex::beginIndexing()
|
|||||||
}
|
}
|
||||||
catch( CLuceneError& error )
|
catch( CLuceneError& error )
|
||||||
{
|
{
|
||||||
qDebug() << "Caught CLucene error:" << error.what();
|
tDebug() << "Caught CLucene error:" << error.what();
|
||||||
Q_ASSERT( false );
|
Q_ASSERT( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,7 +169,7 @@ FuzzyIndex::appendFields( const QMap< unsigned int, QMap< QString, QString > >&
|
|||||||
}
|
}
|
||||||
catch( CLuceneError& error )
|
catch( CLuceneError& error )
|
||||||
{
|
{
|
||||||
qDebug() << "Caught CLucene error:" << error.what();
|
tDebug() << "Caught CLucene error:" << error.what();
|
||||||
Q_ASSERT( false );
|
Q_ASSERT( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user