1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 20:00:13 +02: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 <network/servent.h>
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QNetworkReply> #include <QNetworkReply>
#include <QMessageBox>
// FIXME: bloody hack, remove this for 0.3 // FIXME: bloody hack, remove this for 0.3
// this one adds new functionality to old resolvers // 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; tLog() << "JAVASCRIPT:" << m_scriptPath << message << lineNumber << sourceID;
/// I guess there is somereason for a assert in here, maybe fatal js errors, but /// I guess there is somereason for a assert in here, maybe fatal js errors, but
/// undefined is not so fatal /// undefined is not so fatal
if(sourceID != "undefined") #ifdef QT_DEBUG
Q_ASSERT( false ); QMessageBox::critical( 0, "Script Resolver Error", QString( "%1 %2 %3 %4" ).arg( m_scriptPath ).arg( message ).arg( lineNumber ).arg( sourceID ) );
#endif
} }