If an error occurs in a called procedure, can that exception be passed back?
I created a test project to see if I return the except if that will be caught in the CallOne Try statement but it doesn't.
I guess I could put the CallOne() inside of an if statement. Any suggestions?
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Private Sub CallOne()
'Rest of code which shouldn't execute if CallTwo has an exception.
Catch ex As Exception
MessageBox.Show("1:" & ex.Message)
Private Function CallTwo() As Exception
Dim ex As Exception = Nothing
Throw New Exception("Test Error")
MessageBox.Show("2:" & ex.Message)