Added more error handling
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user