1.

Solve : System Format Exception in debug VB 2008?

Answer»

Happy Thursday all.) Tour here again with a question regarding VB 2008

Ok if I am debugging an application in VB 2008 and in the immediate window I see
" a first chance exception of type System.FormatException blah blah blah" ( actually I have 3 of those lines)
Yet I am able to check my buttons without anything exploding on me,

Is there a way to find out WHERE the exception is in my code? And does first chance mean there is a possible System.Format Exception? and if so that would be I have 3 possible exceptions since I have that line APPEARING 3 times in my immediate window?

Obviously I am very new to VB so what may seem apparent to others its not very CLEAR to me(
Thank youIf you're running the program with debugging, when the error occurs it should take you to it. I'm using VS2008, maybe it's different for you.unless of course an On error resume next (or the .NET equivalent) is used...

does the application crash when you compile it?No it doesn't crash when I compile it.
When I click debug , the message in Immediate Window is
a first chance System.FormatException occurred in mscorlib.dll

It does not take me to error( I know what you mean though as when I have had errors in the past it always took me to the error)

My first question is still..does this mean there is a potential error but the application will still run?
Because I can still run my application. However.. I still have something wrong in my code as my Call event isnt correct.... hehe which is most likely where I am getting the SystemFormat but again it does not take me to that line of code. I am just assuming that is where the error is. ( yay go newb programmer)



I think I am supposed to be using Debug.WriteLine to help with debugging I am going to reread this chapter and then I will check back)
TourJust a note
I bring this question here as every time I ask my professor I get awesome one liners like:

" code doesn't work"


Which is sooo helpful, and I don't want to get kicked from class by saying. " No *@)! Sherlock why do you think I am asking for help?"

can you single step through and see when the errors appear in the immediate window? Sounds to me like some non-fatal exception that mscorlib is dealing with.

Which brings us back to your event! chances are the exception is thrown when the framework tries to raise your event and fails a few times before FINDING a way to call it properly?

debug.writeline if placed throughout your code can identify where the problem is it will appear between lines of debug output).I am getting closer, think I figured out where the error was.
Now I am stuck again on NESTED Try catch) Mayhap I should read your response to my question from a couple WEEKS ago.
=)
tour



Discussion

No Comment Found