Module Module1
Sub Main()
Try
DoMod(1, 2)
Catch Except As Exception
Console.WriteLine("Call generated error: " & Except.Message)
End Try
End Sub
Function DoMod(ByVal A As Integer, ByVal B As Integer) As Integer
Try
Throw New DivideByZeroException()
Catch Except As Exception
Console.WriteLine(Except.Message)
End Try
End Function
End Module
|