I'm guessing this is a Winforms application?
You could set up some 'global' error handlers that will trap any exceptions you haven't explicitly handled in your code.
In your application startup, have some code along the lines of
public static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
}
public static void AppDomain_UnhandledException(object sender, System.UnhandledExceptionEventArgs e)
{
}
[STAThread]
public static void Main()
{
AppDomain.CurrentDomain.UnhandledException += new System.UnhandledExceptionEventHandler(AppDomain_UnhandledException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
}
In the event stubs, write some code that will either log the exception details or do whatever
Some exceptions can be recovered from, but some will cause an application crash....best get debugging and find out what is causing the problem!