From e5ef1bcfc5e275410a6732fccddfd9e189aadc02 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 28 Jun 2018 02:10:31 -0700 Subject: [PATCH] Stub out the error handling when launch/resume fails --- app/streaming/session.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index dd46b9e4..d0eb38d0 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -209,16 +209,23 @@ void Session::exec() Q_ASSERT(m_Computer->currentGameId == 0 || m_Computer->currentGameId == m_App.id); - if (m_Computer->currentGameId != 0) { - http.resumeApp(&m_StreamConfig); - } - else { - http.launchApp(m_App.id, &m_StreamConfig, - prefs.enableGameOptimizations, - prefs.playAudioOnHost, - inputHandler.getAttachedGamepadMask()); + try { + if (m_Computer->currentGameId != 0) { + http.resumeApp(&m_StreamConfig); + } + else { + http.launchApp(m_App.id, &m_StreamConfig, + prefs.enableGameOptimizations, + prefs.playAudioOnHost, + inputHandler.getAttachedGamepadMask()); + } + } catch (const GfeHttpResponseException& e) { + m_ProgressBox.close(); + // TODO: display error dialog + return; } + QByteArray hostnameStr = m_Computer->activeAddress.toLatin1(); QByteArray siAppVersion = m_Computer->appVersion.toLatin1();