Hi,
I don't know what type of application you are using. So I have explained in both WPF and window application using C#.
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
This event will get called when you have not handled any exception in you application.
and the below one more Event it will be get called weather or not you have handled the exception
AppDomain.CurrentDomain.FirstChanceException += new EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>(CurrentDomain_FirstChanceException);
Hope this helps.