Skip to content

Commit 83f73c5

Browse files
committed
Log start-up exceptions
1 parent b0c4535 commit 83f73c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

RetailCoder.VBE/Extension.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System.Runtime.InteropServices;
1212
using System.Windows.Forms;
1313
using Ninject.Extensions.Interception;
14+
using NLog;
1415

1516
namespace Rubberduck
1617
{
@@ -26,6 +27,7 @@ public class _Extension : IDTExtensibility2
2627

2728
private IKernel _kernel;
2829
private App _app;
30+
private readonly Logger _logger = LogManager.GetCurrentClassLogger();
2931

3032
public void OnAddInsUpdate(ref Array custom)
3133
{
@@ -50,6 +52,7 @@ public void OnConnection(object Application, ext_ConnectMode ConnectMode, object
5052
}
5153
catch (Exception exception)
5254
{
55+
_logger.Fatal(exception);
5356
System.Windows.Forms.MessageBox.Show(exception.ToString(), RubberduckUI.RubberduckLoadFailure, MessageBoxButtons.OK, MessageBoxIcon.Error);
5457
}
5558
}

0 commit comments

Comments
 (0)