B2017-247 Added Error Handling for PingSession so that the code will not crash
This commit is contained in:
1 parent
95ae4efc58
commit
94bf1c70a4
1 file changed
+16
-8
@@ -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()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user