By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,660 Members | 1,299 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,660 IT Pros & Developers. It's quick & easy.

Thrown Error NOT Caught!?

P: n/a
Here is the problem.
I'm opening a form that Throw's an error in the Load event and the method
thant opens the form has a try..Catch to Catch the error that is thrown in
the load event.

This works fine running through the design-time enviroment. But if I run
the .EXE it says Unhandled Exception and quits. WHY?

How do I fix this???

Nick
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
"chopsnsauce" <ch*********@discussions.microsoft.com> schrieb:
I'm opening a form that Throw's an error in the Load event and the method
thant opens the form has a try..Catch to Catch the error that is thrown
in
the load event.

This works fine running through the design-time enviroment. But if I run
the .EXE it says Unhandled Exception and quits. WHY?


Take a look at 'Application.ThreadException' in the documentation.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
Well that gives me a work round. But I want the method that opens the form
to catch the exception.

Like I said, when I run my App through the IDE the exceception is caught.
When I run the EXE the exception is unhadles. I want the EXE to catch the
exception as well. Its the same code so why should it behave differently??

Regards,

Nick

"Herfried K. Wagner [MVP]" wrote:
"chopsnsauce" <ch*********@discussions.microsoft.com> schrieb:
I'm opening a form that Throw's an error in the Load event and the method
thant opens the form has a try..Catch to Catch the error that is thrown
in
the load event.

This works fine running through the design-time enviroment. But if I run
the .EXE it says Unhandled Exception and quits. WHY?


Take a look at 'Application.ThreadException' in the documentation.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
I believe this is the result of a bug. The IDE handles catching the
exception differently somehow. There was a discussion about this in
the last few weeks on this group.

Nov 21 '05 #4

P: n/a
Do you have a link to this?

Nick

"Chris Dunaway" wrote:
I believe this is the result of a bug. The IDE handles catching the
exception differently somehow. There was a discussion about this in
the last few weeks on this group.

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.