473,385 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

First Chance Exceptions

Is there any way to find out what is causing a "First Chance Exception"?
Also, is there anyway to turn them off....I'm getting hundreds but all seems
to run OK. I"m using VB 2008 Express Edition.
--
Dennis in Houston
Jul 9 '08 #1
4 1356
http://www.helixoft.com/blog/archives/24

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
..NET and ASP .NET code
Jul 9 '08 #2
Thanks but I tried that but it didn't work...note that I have VB 2008, not VB
2005. I did find that my project that I converted to VB 2008 did have some
sub-projects thad don't get converted when the main project is converted. I
converted all of my projects to VB 2008 and now I don't get any exceptions.
Thanks again.
--
Dennis in Houston
"Peter Macej" wrote:
http://www.helixoft.com/blog/archives/24

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
..NET and ASP .NET code
Jul 9 '08 #3
Dennis wrote:
Is there any way to find out what is causing a "First Chance Exception"?
Odd though it may seem, Exceptions are actually "thrown" /twice/:
The first "throw" is the run-time walking the call-stack in search of a
suitable "Catch" block to deal with the Exception.
The second is what /we/ would call "throwing" the Exception, executing
all the intermediate Finally blocks before resuming at the start of the
selected Catch block.

That first pass is a "First Chance" Exception; it's an Exception in
search of a Catch block to handle it but not yet "really" thrown.
Also, is there anyway to turn them off...
Not AFAIK.
I'm getting hundreds but all seems to run OK.
This is perfectly normal where Exceptions are being thrown and properly
caught.

HTH,
Phill W.
Jul 11 '08 #4
Thanks for you clairication on this topic and confirmation of what I
suspected in that there is no way to turn them off.

When I converted all the sub-projects included in my main project to VB 2008
from VB2005, I dont' seem to get any more "first chance" exceptions.
--
Dennis in Houston
"Phill W." wrote:
Dennis wrote:
Is there any way to find out what is causing a "First Chance Exception"?

Odd though it may seem, Exceptions are actually "thrown" /twice/:
The first "throw" is the run-time walking the call-stack in search of a
suitable "Catch" block to deal with the Exception.
The second is what /we/ would call "throwing" the Exception, executing
all the intermediate Finally blocks before resuming at the start of the
selected Catch block.

That first pass is a "First Chance" Exception; it's an Exception in
search of a Catch block to handle it but not yet "really" thrown.
Also, is there anyway to turn them off...

Not AFAIK.
I'm getting hundreds but all seems to run OK.

This is perfectly normal where Exceptions are being thrown and properly
caught.

HTH,
Phill W.
Jul 11 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pieter | last post by:
Hi, I have a Windows Forms application (VB.NET 2.0) which uses a Class Library in C#. The application runs fine, but when I run it in debug mode, I get several "A first chance exception of type...
1
by: Tommy | last post by:
I get this message in the output window of my app I just converted from VS 2003 to 2005. It's a VB.Net app. A first chance exception of type 'System.InvalidCastException' occurred in...
2
by: Abubakar | last post by:
Hi all, I'm writing an app in vc++ 2k5 (all native/unmanaged). This application does a lot of multithreading and socket programming. Its been months since I'm developing this application, at...
7
by: illegal.prime | last post by:
Hi all, I've got a client/server application and just wanted to ensure that this is expected behavior. I recently set the following configuration in Visual Studio: Debug->Exceptions->Break Into...
3
by: GS | last post by:
why am i getting A first chance exception of type 'System.NullReferenceException' occurred in myapp.exe below? and what can i do get rid of it? Private Function getPrefxType() As String If...
2
by: | last post by:
VStudio 2005 Pro. In the Immediate window for a running application I continually see lines like A first chance exception of type'System.Runtime.InteropServices.COMException' occured in ...
8
by: Olivier BESSON | last post by:
Hello, VB.NET 1.1 IIS 6 I'm developping a winform client app of a web service of mine. I used to set the IDE with "halt in debugger" on "common language runtime exceptions". Every time i...
0
by: Academia | last post by:
I see the following in my "Output" pane when I run my program. A first chance exception of type 'System.NullReferenceException' occurred in .... I believe there is a way to configure VS so...
6
by: zubair1 | last post by:
Hi, Today, i added some new code which was to see if a file is locked or not (in use by another application). While i did that it was showing me some errors like in the Output window:- A first...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.