mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
Exception handling for some folder events, which are sometimes invoked with deleted folders.
This commit is contained in:
parent
7a4a534901
commit
1e690a63e6
@ -168,12 +168,18 @@ namespace Acacia.ZPush
|
||||
#region Event handlers
|
||||
|
||||
private void SubFolders_FolderAdd(MAPIFolder folder)
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Instance.Debug(this, "Folder added in {0}: {1}", this._item.Name, folder.Name);
|
||||
WatchChild((Folder)folder);
|
||||
}
|
||||
catch (System.Exception e) { Logger.Instance.Error(this, "Exception in SubFolders_FolderAdd: {0}: {1}", Name, e); }
|
||||
}
|
||||
|
||||
private void SubFolders_FolderRemove()
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Instance.Debug(this, "Folder removed from {0}", this._item.Name);
|
||||
|
||||
@ -210,6 +216,8 @@ namespace Acacia.ZPush
|
||||
entry.Value.Cleanup();
|
||||
}
|
||||
}
|
||||
catch (System.Exception e) { Logger.Instance.Error(this, "Exception in SubFolders_FolderRemove: {0}: {1}", Name, e); }
|
||||
}
|
||||
|
||||
private void SubFolders_FolderChange(MAPIFolder folder)
|
||||
{
|
||||
@ -231,10 +239,7 @@ namespace Acacia.ZPush
|
||||
WatchChild((Folder)folder);
|
||||
}
|
||||
}
|
||||
catch(System.Exception e)
|
||||
{
|
||||
Logger.Instance.Trace(this, "FolderChange exception: {0}: {1}", Name, e);
|
||||
}
|
||||
catch (System.Exception e) { Logger.Instance.Error(this, "Exception in SubFolders_FolderChange: {0}: {1}", Name, e); }
|
||||
}
|
||||
|
||||
private void Items_ItemAdd(object oItem)
|
||||
|
Loading…
Reference in New Issue
Block a user