Something better than "application has generated an exception that could not be handled"?

R

rsine

I ran into an error on a previously working windows form application
that stated:

application has generated an exception that could not be handled.

I spent many frustrating hours before finding the issue to be a
missing double quote mark in the applications config file. This was
an error I made when trying to troubleshoot another issue with the
application. My question is if there is a way to get a more
descriptive message of the nature of the error? I would like to have
an event handler for such issues but I am not sure if this is possible
or if it is, how to go about doing it. Any help would be appreciated.
 
B

Bob Powell [MVP]

The exception details, stack-trace and possibly inner-exception will
provide fairly detailed information. Exceptions such as these are common
while developing. The trick is to use the info provided in Visual Studio
to discern the fault.

You may need to refer back in the stack-trace 10-15 lines to find where
the exception touches your code but this will give you an idea of the
operation that was being performed at the time of the exception.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

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