Use custom exception for replay creation failures

This commit is contained in:
baldurk
2016-08-04 14:14:29 +02:00
parent 42f57990d9
commit 8a5d300e78
6 changed files with 34 additions and 22 deletions
+2 -2
View File
@@ -169,7 +169,7 @@ namespace renderdocui.Windows
}
else
{
throw new ApplicationException();
throw new ReplayCreateException(ReplayCreateStatus.NetworkIOFailed);
}
while (m_Connection.Connected)
@@ -264,7 +264,7 @@ namespace renderdocui.Windows
ConnectionClosed();
});
}
catch (ApplicationException)
catch (ReplayCreateException)
{
this.BeginInvoke((MethodInvoker)delegate
{
+6 -3
View File
@@ -170,9 +170,12 @@ namespace renderdocui.Windows.Dialogs
SetRemoteServerLive(node, true);
server.ShutdownConnection();
}
catch (ApplicationException)
catch (ReplayCreateException ex)
{
SetRemoteServerLive(node, false);
if(ex.Status == ReplayCreateStatus.NetworkRemoteBusy)
SetRemoteServerLive(node, true);
else
SetRemoteServerLive(node, false);
}
StaticExports.EnumerateRemoteTargets(hostname, (UInt32 i) => {
@@ -204,7 +207,7 @@ namespace renderdocui.Windows.Dialogs
conn.Shutdown();
}
catch (ApplicationException)
catch (ReplayCreateException)
{
}
});