**** Merged from MCS ****
[mono-project.git] / mcs / btests / ExceptionHandlingB.vb
blob88a42ab87880e56a99995e55aafafe6abac90ebb
1 Imports System
3 Module ExceptionHandlingB
4 Dim i As Integer
5 Sub Main()
7 Try
9 Try
10 i = 2 / i
11 i = 3
12 Console.WriteLine(i)
13 Catch e As Exception
14 Console.WriteLine(e.Message)
15 ' Try statement wil not handle any exceptions thrown in Catch block
16 Throw New Exception("FF")
17 End Try ' inner try
19 ' Catch exception thrown by inner Try statement
20 Catch e As Exception When e.Message = "FF"
21 Console.WriteLine("OK")
22 End Try ' outer try
23 End Sub
25 End Module