In fact, none of the handlers I put here work. Not even in an example from MSDN. WTF?
Code:
internal partial class Form1
{
static void Main()
{
try
{
Form f = new Form();
f.Load += new EventHandler((object s, EventArgs e) =>
{
throw new WebException();
});
Application.ThreadException += (object o, ThreadExceptionEventArgs e) =>
{
MessageBox.Show("ThreadException");
};
Application.ThreadExit += new EventHandler((object o, EventArgs e) => {
MessageBox.Show("Exit");
});
Application.Run(f);
}
catch(Exception e)
{
MessageBox.Show("Exception");
}
}
}
}