Thrown Error NOT Caught!?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
chopsnsauce said:
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.
 
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
 
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.
 
Back
Top