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

Don't assert on script output in debug mode, just show the error

This commit is contained in:
Leo Franchi 2011-11-03 21:07:43 -04:00
parent 52b77464f1
commit b26bd5e296

View File

@ -31,6 +31,7 @@
#include <network/servent.h>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QMessageBox>
// FIXME: bloody hack, remove this for 0.3
// this one adds new functionality to old resolvers
@ -186,9 +187,9 @@ ScriptEngine::javaScriptConsoleMessage( const QString& message, int lineNumber,
tLog() << "JAVASCRIPT:" << m_scriptPath << message << lineNumber << sourceID;
/// I guess there is somereason for a assert in here, maybe fatal js errors, but
/// undefined is not so fatal
if(sourceID != "undefined")
Q_ASSERT( false );
#ifdef QT_DEBUG
QMessageBox::critical( 0, "Script Resolver Error", QString( "%1 %2 %3 %4" ).arg( m_scriptPath ).arg( message ).arg( lineNumber ).arg( sourceID ) );
#endif
}