Added try..catch that simply displays any error upon addin startup

This commit is contained in:
gamosoft_cp 2014-10-23 17:12:28 +00:00
parent 2cf3f6fd93
commit 8a5363e568

View File

@ -35,6 +35,8 @@ namespace Outlook2013TodoAddIn
/// <param name="sender">Sender</param>
/// <param name="e">EventArgs</param>
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
try
{
Globals.ThisAddIn.Application.NewMailEx += Application_NewMailEx;
this.AddRegistryNotification();
@ -67,6 +69,12 @@ namespace Outlook2013TodoAddIn
// TODO: Make sure there are no memory leaks (dispose COM objects)
}
catch (Exception exc)
{
MessageBox.Show(String.Format("Error starting Calendar AddIn: {0}", exc.ToString()));
throw exc;
}
}
/// <summary>
/// Process new email