none
Error on function don't return error to principal procedure! RRS feed

  • Question

  •  

    private sub Teste ()
    
      try
    
          call procedureTeste 'If error occur here on procedureTeste, when back, it shouldn't go to Catch, instead of go to msgbox? 
          msgbox "here"
    
      catch ex as Execption
          
      end Try
    end Sub
    Monday, April 27, 2009 3:46 PM

Answers

All replies

  • Use the finally clause:

      Try
        procedureTeste()
      Finally
        MsgBox "here"
      End Try


    Hans Passant.
    Monday, April 27, 2009 4:24 PM
  • Use the finally clause:

      Try
        procedureTeste()
      Finally
        MsgBox "here"
      End Try


    Hans Passant.

    I don't want to go to MsgBox, if a error occur on procedureTeste, when back... it should go to Catch, isn't?
    Monday, April 27, 2009 4:28 PM