Error handling not working???

G

George Hardy

i was wondering why i never get to see my message box. when i break on the
message box, and try to examine the ex.message, it says

" ex.Message 'ex.Message' is not declared or the module containing it is not
loaded in the debugging session. "


why doesn't this code work?????

==========================================================

try

...<code that breaks>

Catch ex As Exception

MessageBox ("error occured: " & ex.Message)

End Try

==========================================================

thanks in advance!

george hardy
 
H

Herfried K. Wagner [MVP]

George Hardy said:
i was wondering why i never get to see my message box. when i break on the
message box, and try to examine the ex.message, it says

" ex.Message 'ex.Message' is not declared or the module containing it is
not
loaded in the debugging session. "

This works just fine on my VS 2005 Team Suite SP1 on Windows XP Professional
SP2. Which version are you using?
 
G

George Hardy

same stuff....
xpProSP2,
VS2005pro sp1

it's wierd, it wont even display the message box in the catch...just skips
over it.

george
 
M

Mythran

George Hardy said:
same stuff....
xpProSP2,
VS2005pro sp1

it's wierd, it wont even display the message box in the catch...just skips
over it.

george

It sounds as though you started a debug session or such without compiling
modified code...so it breaks on a line where the code has changed, but
hasn't yet compiled....

Although, I've seen weird stuff in the debugger as well and won't go as far
as saying this isn't a bug anyways :)

HTH,
Mythran
 

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