Exception handling on ChatHandler

This commit is contained in:
2015-09-29 07:12:48 +02:00
parent 30f9225cc4
commit 974e969fb8
2 changed files with 13 additions and 6 deletions

View File

@@ -194,7 +194,7 @@ namespace VAR.Focus.Web.Controls
{
lock (_monitor) { Monitor.PulseAll(_monitor); }
}
#endregion
}
}

View File

@@ -26,13 +26,20 @@ namespace VAR.Focus.Web.Controls
public void ProcessRequest(HttpContext context)
{
if (context.Request.RequestType == "GET")
try
{
ProcessReciver(context);
if (context.Request.RequestType == "GET")
{
ProcessReciver(context);
}
if (context.Request.RequestType == "POST")
{
ProcessSender(context);
}
}
if (context.Request.RequestType == "POST")
catch (Exception ex)
{
ProcessSender(context);
context.ResponseObject(new OperationStatus { IsOK = false, Message = ex.Message, });
}
}
@@ -112,7 +119,7 @@ namespace VAR.Focus.Web.Controls
}
context.ResponseObject(new OperationStatus { IsOK = true, Message = "Message sent" });
}
#endregion
}
}