How Do I Handle errors in Windows Applications
Posted
by yytg
on Stack Overflow
See other posts from Stack Overflow
or by yytg
Published on 2010-05-31T14:50:03Z
Indexed on
2010/05/31
14:53 UTC
Read the original article
Hit count: 269
I did a program and in some point - when the program needs to exit he throw an exception here is the code
try
{
Application.Run(new Form1());
}
catch (ExitException) { }
In the VS it's working fine (VS 2008 - C#) But when I run it separately from the VS - the program say so the error is not handled
I know so I can do like this Application.ExitThread()
- But... I need to handle the exit of the program.
Why In VS its work fine and outside its create errors?
And how to solve it without using the global error handling?
Thanks in advance
© Stack Overflow or respective owner