Hi,
I have added a try/catch block in the Main() method of my c# window
application to catch all exceptions in the application. But it is no
catching the errors thrown from timer's tick event. My code is give
below:
[STAThread]
static void Main()
{
try
{
Application.Run(new Form1());
}
catch (Exception exec)
{
MessageBox.Show(exec.ToString());
}
}
private void timer1_Tick(object sender, System.EventArgs e)
{
throw new Exception("throwing exception from timer..");
}
Now it shows a windows exception from timer's tick event. Can any on
help me to fix it?
Thanks in advance
--
jjoh
-----------------------------------------------------------------------
jjohn's Profile: http://www.hightechtalks.com/m87
View this thread: http://www.hightechtalks.com/t234875