Option Strict On
Public Module Tester
Public Sub Main()
Try
RoutineA()
Catch e As Exception
Console.WriteLIne("Main error handler: " & e.Message)
End Try
End Sub
Private Sub RoutineA()
Try
Throw New ApplicationException
Catch e As ApplicationException
Console.WriteLine("Exception in RoutineA: " & e.Message)
End Try
Try
Throw New ArgumentException
Catch e As ApplicationException
Console.WriteLine("Exception in RoutineA: " & e.Message)
End Try
Console.WriteLine("About to exit RoutineA.")
End Sub
End Module
|