message in try catch
This commit is contained in:
@@ -34,8 +34,16 @@ namespace CardMarketServer
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
string message = reader.ReadString();
|
||||
|
||||
string? message;
|
||||
try
|
||||
{
|
||||
message = reader.ReadString();
|
||||
}
|
||||
catch(FormatException)
|
||||
{
|
||||
Console.WriteLine("Formatexception ");
|
||||
continue;
|
||||
}
|
||||
if (message != null)
|
||||
{
|
||||
EACTION action = EACTION.NONE;
|
||||
|
||||
Reference in New Issue
Block a user