Error handling not working???

  • Thread starter Thread starter George Hardy
  • Start date Start date
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
 
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?
 
same stuff....
xpProSP2,
VS2005pro sp1

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

george
 
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
 
Back
Top