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

@ -125,14 +125,22 @@ namespace VEPROMS.CSLA.Library
} }
public List<int> PingSession() public List<int> PingSession()
{ {
List<int> myList = new List<int>(); // B2017-247 Add Error handler for PingSession
SessionPing.Execute(this.SessionID); try
ChangedContents = SessionChangedContents.Execute(this.LastContentChange); {
ChangedItems = SessionChangedItems.Execute(this.LastContentChange); List<int> myList = new List<int>();
OwnerInfoList oil = OwnerInfoList.GetBySessionID(this.SessionID); SessionPing.Execute(this.SessionID);
foreach (OwnerInfo oi in oil) ChangedContents = SessionChangedContents.Execute(this.LastContentChange);
myList.Add(oi.OwnerID); ChangedItems = SessionChangedItems.Execute(this.LastContentChange);
return myList; OwnerInfoList oil = OwnerInfoList.GetBySessionID(this.SessionID);
foreach (OwnerInfo oi in oil)
myList.Add(oi.OwnerID);
return myList;
}
catch (Exception)
{
return null;
}
} }
public void EndSession() public void EndSession()
{ {