Just a short question concerning exception handling....
All of my applications contain an event handling in the Main() like this
one:
[STAThread]
static void Main()
{
// declare global exeption handler
Application.ThreadException += new
ThreadExceptionEventHandler(GlobalExceptionHandler .OnThreadException);
...
// load main form and start application
...
}
By that I am showing a special exception form to the user (with features
like "send bug report to ..."). This is for cases where I forgot a try/catch
somewhere.
Now I have to write a UserControl for an application that is out of my
control so I do not have personal influence on that code.
My UserControl is just loaded by that application, user can do several
things with it and it stays loaded all the time until the application is
closed again.
So the only entry point I have for this control is just the constructor.
How can I achieve to have a "global" exception handling just for my own
UserControl code? With Application.ThreadException I would include also the
hosting application...
Thanks in advance!
Tom