I have a nice tidy way of capturing unhandled exceptions which I display to my users and (optionally) get emailed to myself. They generally look something like this:
Uncaught exception encountered in MyApp (Version 1.1.0)! Exception: Object reference not set to an instance of an object. Exception type: System.NullReferenceException Source: MyApp Stack trace: at SomeLibrary.DoMoreStuff() in c:\projects\myapp\somelibrary.h:line 509 at SomeAlgothim.DoStuff() in c:\projects\myapp\somealgorithm.h:line 519 at MyApp.MainForm.ItemCheckedEventHandler(Object sender, ItemCheckedEventArgs e) in c:\projects\myapp\mainform.cpp:line 106 at System.Windows.Forms.ListView.OnItemChecked(ItemCheckedEventArgs e) at System.Windows.Forms.ListView.WmReflectNotify(Message& m) at System.Windows.Forms.ListView.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Is it possible to launch visual studio and have it open c:\projects\myapp\somelibrary.h on the offending line and if so, how?
I'd also like to do this from the (html) email I generate if that's possible?