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()
Thanks,
Question asked by ashwini.
Re: throwexception from function to function
in func2() something like this:
Try
func1()
Catch ex as Exception
' Handle the exception
Finally
' Cleanup code, always executed regardless of the exception
End Try
and in func1():
...
Throw new Exception("My message")
...