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