Error handling not working???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Hardy

    #1

    Error handling not working???

    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






  • Herfried K. Wagner [MVP]

    #2
    Re: Error handling not working???

    "George Hardy" <nospam@nospam. comschrieb:
    >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?

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    • George Hardy

      #3
      Re: Error handling not working???

      same stuff....
      xpProSP2,
      VS2005pro sp1

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

      george

      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
      news:eZ20bRhzHH A.5380@TK2MSFTN GP04.phx.gbl...
      "George Hardy" <nospam@nospam. comschrieb:
      >>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?
      >
      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
      >

      Comment

      • Mythran

        #4
        Re: Error handling not working???



        "George Hardy" <nospam@nospam. comwrote in message
        news:efeL3phzHH A.4916@TK2MSFTN GP03.phx.gbl...
        same stuff....
        xpProSP2,
        VS2005pro sp1
        >
        it's wierd, it wont even display the message box in the catch...just skips
        over it.
        >
        george
        >
        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
        news:eZ20bRhzHH A.5380@TK2MSFTN GP04.phx.gbl...
        >"George Hardy" <nospam@nospam. comschrieb:
        >>>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?
        >>
        >--
        >M S Herfried K. Wagner
        >M V P <URL:http://dotnet.mvps.org/>
        >V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
        >>
        >
        >
        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


        Comment

        Working...