Added more error handling

This commit is contained in:
2015-10-20 11:18:03 +02:00
parent 217035b528
commit a7f8039fba
2 changed files with 13 additions and 3 deletions
+11 -1
View File
@@ -52,7 +52,17 @@ namespace ErgometerLibrary
*/
string str = ReadString(client);
NetCommand net = NetCommand.Parse(str);
NetCommand net;
if (str != "")
try {
net = NetCommand.Parse(str);
}
catch(Exception e)
{
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
}
else
net = new NetCommand(NetCommand.CommandType.ERROR, 0);
return net;
}
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.3.1")]
[assembly: AssemblyFileVersion("1.0.3.1")]
[assembly: AssemblyVersion("1.0.3.5")]
[assembly: AssemblyFileVersion("1.0.3.5")]