HELP - Un-Handled Error Message prior to 'Sub Main

F

Fred Gravel

I have a Windows app that I have installed on 3 client machines (all
win2k) thatreturn an un-handled error message when starting up.

I have placed 'Try/Catch/Finally' blocks in the 'sub main' and it
doesn't even get to there. Problem is the application works fine on my
development PC.

I have MDAC v2.8 and Framework 1.1 on all machines. I have cross
checked all of the .dll versions and verified that they are the same as
the ones on my machine

What runs BEFORE sub main ?
 
H

Herfried K. Wagner [MVP]

* "Fred Gravel said:
I have a Windows app that I have installed on 3 client machines (all
win2k) thatreturn an un-handled error message when starting up.

I have placed 'Try/Catch/Finally' blocks in the 'sub main' and it
doesn't even get to there. Problem is the application works fine on my
development PC.

See Jay B. Harlow's explanation:

<URL:http://groups.google.de/[email protected]>
 
F

Fred Gravel

Herfried said:
See Jay B. Harlow's explanation:

<url
http://groups.google.de/[email protected]
x.gbl>



Unfortunatly, Jay's explanation helps very little. The application
start up procedure doesn't even make it as far as the sub main.
Throwing custom exception errors is great but I have no idea where to
throw it from. In Jay's example he throws it from the button_click
event but in my app. I have put a message box pop-up as the first line
in sub main and it doesn't fire.

My question remains the same - What happens BEFORE sub main and how do
I trap an error prior to it ??
 
H

Herfried K. Wagner [MVP]

Did you add a handler to 'Application.ThreadException'? If this doesn't
work, then there must be sonething wrong with your system/.NET Framework
installation.
 
F

Fred Gravel

Herfried said:
(all >>> win2k) thatreturn an un-handled error message when starting
up.

Did you add a handler to 'Application.ThreadException'? If this
doesn't work, then there must be sonething wrong with your
system/.NET Framework installation.



Actually I had added a handler to the 'Application.ThreadException' in
the 'sub main' but the app was still throwing 'Unhandled exceptions".
The problem was in WHERE my 'sub main' was. I had my sub main buried in
a module (old style) rather than as a 'shared sub main' in the main
application form. Once I moved it to the main form, a more definitive
error was produced along with the stack trace, thanks to Jay's example,
and I believe I'm on the track to finding out what is causing the issue.

Thanx for the direction
 
H

Herfried K. Wagner [MVP]

* "Fred Gravel said:
Actually I had added a handler to the 'Application.ThreadException' in
the 'sub main' but the app was still throwing 'Unhandled exceptions".
The problem was in WHERE my 'sub main' was. I had my sub main buried in
a module (old style) rather than as a 'shared sub main' in the main
application form. Once I moved it to the main form, a more definitive
error was produced along with the stack trace, thanks to Jay's example,
and I believe I'm on the track to finding out what is causing the issue.

Thank you for sharing that with the group!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top