Handle connection errors properly, displaying the error message

This commit is contained in:
baldurk
2016-08-24 13:00:37 +02:00
parent ec67b41dfe
commit c9474f5bc3
2 changed files with 8 additions and 4 deletions
+1 -3
View File
@@ -514,9 +514,7 @@ namespace renderdocui.Code
// if the renderer isn't running, we hit a failure case so display an error message
if (!m_Renderer.Running)
{
string errmsg = "Unknown error message";
if (m_Renderer.InitException.Data.Contains("status"))
errmsg = ((ReplayCreateStatus)m_Renderer.InitException.Data["status"]).Str();
string errmsg = m_Renderer.InitException.Status.Str();
MessageBox.Show(String.Format("{0}\nFailed to open file for replay: {1}.\n\n" +
"Check diagnostic log in Help menu for more details.", origFilename, errmsg),