Possible Duplicate:
How do I continue running after an unhandled exception?
I've seen tons of similar questions and anwsers on SO, but not the same.
I'm handling all uncaught exception in main like this:
In Main I set following:
Application.ThreadException += new ThreadExceptionEventHandler(MainForm_UIThreadException);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException +=
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Run(new MainForm());
If I run my programm in debugger, after the exception occured and I handled them in MainForm_UIThreadException or CurrentDomain_UnhandledException, the yellow debugger arrow points to the line, where this exception actually occured, so I can step over, which means (for me) that execution context isn't lost.
I know that I cant continue execution for unhandled exceptions, but this esception is actually handled, just somewhere else.
Is it possible to continue execution of current function?
Thank you