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

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

P: n/a
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 ?
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
* "Fred Gravel" <fg*****@lethbridge.ca> scripsit:
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/groups?selm=e04jbmSiEHA.1384%40TK2MSFTNGP10.phx.gb l>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

P: n/a
Herfried K. Wagner [MVP] wrote:
* "Fred Gravel" <fg*****@lethbridge.ca> scripsit:
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/groups?selm=...K2MSFTNGP10.ph
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 ??
Nov 21 '05 #3

P: n/a
* "Fred Gravel" <fg*****@lethbridge.ca> scripsit:
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/groups?selm=...K2MSFTNGP10.ph
x.gbl>


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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4

P: n/a
Herfried K. Wagner [MVP] wrote:
* "Fred Gravel" <fg*****@lethbridge.ca> scripsit:
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/groups?selm=...K2MSFTNGP10.ph x.gbl>


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
Nov 21 '05 #5

P: n/a
* "Fred Gravel" <fg*****@lethbridge.ca> scripsit:
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!

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.