message in try catch

This commit is contained in:
2023-08-09 12:20:34 +02:00
parent d0c4cc2a71
commit 17c0422b1b

View File

@@ -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;