1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

Catch by const ref and assert to check hypothesis

This commit is contained in:
Leo Franchi 2012-06-17 15:30:27 +02:00
parent 7b8136a36e
commit a8f0053fc8
2 changed files with 6 additions and 2 deletions

View File

@ -176,10 +176,12 @@ Album::id() const
s_albumsById[ m_id ] = m_ownRef.toStrongRef();
s_idMutex.unlock();
}
catch( boost::future_uninitialized& e )
catch( const boost::future_uninitialized& e )
{
qWarning() << "Caught boost::future_uninitialized when trying to get artist id from future, WTF?";
qWarning() << "Potential race condition, do we have an ID?" << m_id << "and waiting?" << m_waitingForId << e.what();
Q_ASSERT( !m_waitingForId );
}
}

View File

@ -256,10 +256,12 @@ Artist::id() const
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
s_idMutex.unlock();
}
catch( boost::future_uninitialized& e )
catch( const boost::future_uninitialized& e )
{
qWarning() << "Caught boost::future_uninitialized when trying to get artist id from future, WTF?";
qWarning() << "Potential race condition, do we have an ID?" << m_id << "and waiting?" << m_waitingForFuture << e.what();
Q_ASSERT( !m_waitingForFuture );
}
}