From 332e9c044887f890df8145632887e60ec2de2f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Lindstr=C3=B6m?= Date: Thu, 12 Apr 2012 19:12:45 +0200 Subject: [PATCH] Output friendly errors --- src/accounts/spotify/SpotifyAccount.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/accounts/spotify/SpotifyAccount.cpp b/src/accounts/spotify/SpotifyAccount.cpp index 9cc4de8df..efe321956 100644 --- a/src/accounts/spotify/SpotifyAccount.cpp +++ b/src/accounts/spotify/SpotifyAccount.cpp @@ -38,8 +38,7 @@ using namespace Tomahawk; using namespace Accounts; -class JobStatusView; -class ErrorStatusMessage; + static QPixmap* s_icon = 0; @@ -349,9 +348,12 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg { const QString error = msg.value( "msg" ).toString(); if( error.isEmpty() ) - error = "Spotify: Got empty error message...Please report"; + return; - JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( QString( "Spotify: %1" ).arg( error ) ) ); + if( msg.value( "isDebugMsg" ).toBool() ) + tDebug( LOGVERBOSE ) << "SpotifyResolverError: " << error; + else + JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( QString( "Spotify: %1" ).arg( error ) ) ); } }