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:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user