B2017-247 Added Error Handling for PingSession so that the code will not crash

This commit is contained in:
Rich 2017-11-06 16:47:41 +00:00
parent 95ae4efc58
commit 94bf1c70a4

View File

@ -124,6 +124,9 @@ namespace VEPROMS.CSLA.Library
set { _ChangedItems = value; } set { _ChangedItems = value; }
} }
public List<int> PingSession() public List<int> PingSession()
{
// B2017-247 Add Error handler for PingSession
try
{ {
List<int> myList = new List<int>(); List<int> myList = new List<int>();
SessionPing.Execute(this.SessionID); SessionPing.Execute(this.SessionID);
@ -134,6 +137,11 @@ namespace VEPROMS.CSLA.Library
myList.Add(oi.OwnerID); myList.Add(oi.OwnerID);
return myList; return myList;
} }
catch (Exception)
{
return null;
}
}
public void EndSession() public void EndSession()
{ {
SessionEnd.Execute(this.SessionID); SessionEnd.Execute(this.SessionID);