B2017-247 Added Error Handling for PingSession so that the code will not crash
This commit is contained in:
parent
95ae4efc58
commit
94bf1c70a4
@ -125,14 +125,22 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public List<int> PingSession()
|
||||
{
|
||||
List<int> myList = new List<int>();
|
||||
SessionPing.Execute(this.SessionID);
|
||||
ChangedContents = SessionChangedContents.Execute(this.LastContentChange);
|
||||
ChangedItems = SessionChangedItems.Execute(this.LastContentChange);
|
||||
OwnerInfoList oil = OwnerInfoList.GetBySessionID(this.SessionID);
|
||||
foreach (OwnerInfo oi in oil)
|
||||
myList.Add(oi.OwnerID);
|
||||
return myList;
|
||||
// B2017-247 Add Error handler for PingSession
|
||||
try
|
||||
{
|
||||
List<int> myList = new List<int>();
|
||||
SessionPing.Execute(this.SessionID);
|
||||
ChangedContents = SessionChangedContents.Execute(this.LastContentChange);
|
||||
ChangedItems = SessionChangedItems.Execute(this.LastContentChange);
|
||||
OwnerInfoList oil = OwnerInfoList.GetBySessionID(this.SessionID);
|
||||
foreach (OwnerInfo oi in oil)
|
||||
myList.Add(oi.OwnerID);
|
||||
return myList;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public void EndSession()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user