Results 1 to 2 of 2

Thread: throwexception from function to function

  1. #1
    Expert Member
    Join Date
    Oct 2006

    throwexception from function to function

    Suppose there are 2 functions and i need to throw the exception from one function to other function how do i do that?ex:func1() and func2() I need to throw an exception from func1() and need to catch it in func2()


    Question asked by ashwini.

  2. #2
    Junior Member
    Join Date
    Jun 2007

    Re: throwexception from function to function

    in func2() something like this:

    Catch ex as Exception
    ' Handle the exception
    ' Cleanup code, always executed regardless of the exception
    End Try

    and in func1():
    Throw new Exception("My message")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.